Colors

How to use functional colors in your app.

Color is one of the foundational tools in Canva’s design system. It’s used in almost every component and is a powerful tool for providing hierarchy and guiding users towards particular functionality or features.

We use "functional" color names, which define colors based on their role in the interface. Functional colors make it easier to select the most appropriate colors for any scenario your user could encounter using your app.

We use different shades or variants of these base functional colors to communicate a component's state (e.g. active, hover, disabled).

Functional colors can be accompanied by complementary colors, like foreground colors that are meant to pair perfectly with the primary base colors. For example:

Some functional colors like the ones shown below have low-coloring options, which are more subdued than their primary base functional colors.

  • Use Canva's functional colors to design your app rather than defining custom colors. Your app will appear in dark mode the majority of the time, but it can also appear in light mode. Using functional colors will help your app stay on brand and allow it to handle theming, as functional colors will display the appropriate color based on the theme.
  • You can access colors through the UI Kit, by using design tokens in your CSS (through custom variables) or importing them directly in TypeScript/JavaScript.
  • When you use the UI Kit's AppUiProvider, these color tokens will be automatically themed.
  • Pair functional colors with appropriate complementary colors from their set when needed. For example, colorPrimary with colorPrimaryFore.
  • Make sure you plan for sufficient color contrast, accounting for accessibility. If you're using the appropriate functional colors, then this is taken care of automatically.
  • Ask for feedback in our Slack channel if you’re unsure on how to use the colors.

These colors are used to provide hierarchy around the product.

Used for primary actions, in areas such as buttons and badges.

Functional color (CSS variable name)Dark themeLight theme
--ui-kit-color-primary
--ui-kit-color-primary-hover
--ui-kit-color-primary-active
--ui-kit-color-primary-disabled
--ui-kit-color-primary-fore
--ui-kit-color-primary-fore-disabled

Used for secondary actions, in areas such as buttons and badges.

Functional color (CSS variable name)Dark themeLight theme
--ui-kit-color-secondary
--ui-kit-color-secondary-hover
--ui-kit-color-secondary-active
--ui-kit-color-secondary-disabled
--ui-kit-color-secondary-fore
--ui-kit-color-secondary-fore-disabled

Used for tertiary actions, in areas such as buttons and badges.

Functional color (CSS variable name)Dark themeLight theme
--ui-kit-color-tertiary
--ui-kit-color-tertiary-hover
--ui-kit-color-tertiary-active
--ui-kit-color-tertiary-disabled
--ui-kit-color-tertiary-fore
--ui-kit-color-tertiary-fore-disabled

Used for situations when contrast is hard to achieve, such as buttons on top of images.

Functional color (CSS variable name)Dark themeLight theme
--ui-kit-color-contrast
--ui-kit-color-contrast-hover
--ui-kit-color-contrast-active
--ui-kit-color-contrast-disabled
--ui-kit-color-contrast-fore
--ui-kit-color-contrast-fore-disabled

These colors are used to provide tonal differences around the product.

Used for positive actions, such as alert messages and badges.

Functional color (CSS variable name)Dark themeLight theme
--ui-kit-color-positive
--ui-kit-color-positive-hover
--ui-kit-color-positive-active
--ui-kit-color-positive-disabled
--ui-kit-color-positive-low
--ui-kit-color-positive-fore
--ui-kit-color-positive-fore-low
--ui-kit-color-positive-fore-disabled

Used for negative actions or errors, such as alert messages and buttons, though can also be used to highlight more critical areas such as notification badges.

Functional color (CSS variable name)Dark themeLight theme
--ui-kit-color-critical
--ui-kit-color-critical-hover
--ui-kit-color-critical-active
--ui-kit-color-critical-disabled
--ui-kit-color-critical-low
--ui-kit-color-critical-fore
--ui-kit-color-critical-fore-low
--ui-kit-color-critical-fore-disabled

Used for warnings, in areas such as alert messages or badges.

Functional color (CSS variable name)Dark themeLight theme
--ui-kit-color-warn
--ui-kit-color-warn-hover
--ui-kit-color-warn-active
--ui-kit-color-warn-disabled
--ui-kit-color-warn-low
--ui-kit-color-warn-fore
--ui-kit-color-warn-fore-low
--ui-kit-color-warn-fore-disabled

Used for general info, in areas such as alert messages or badges.

Functional color (CSS variable name)Dark themeLight theme
--ui-kit-color-info
--ui-kit-color-info-hover
--ui-kit-color-info-active
--ui-kit-color-info-disabled
--ui-kit-color-info-low
--ui-kit-color-info-fore
--ui-kit-color-info-fore-low
--ui-kit-color-info-fore-disabled

Used for neutral info, in areas such as badges.

Functional color (CSS variable name)Dark themeLight theme
--ui-kit-color-neutral
--ui-kit-color-neutral-hover
--ui-kit-color-neutral-active
--ui-kit-color-neutral-disabled
--ui-kit-color-neutral-low
--ui-kit-color-neutral-fore
--ui-kit-color-neutral-fore-low
--ui-kit-color-neutral-fore-disabled

Contextual functional colors are used for specific use cases such as backgrounds, typography, and borders. The use of these colors is mostly contained to base components and page level styles.

Used for typography and typography-like elements. There's variables to account for typographical hierarchy — with all options meeting accessibility requirements — as well as variables for different tones and applications (for example, links).

Functional color (CSS variable name)Dark themeLight theme
--ui-kit-color-typography-primary
--ui-kit-color-typography-secondary
--ui-kit-color-typography-tertiary
--ui-kit-color-typography-quaternary
--ui-kit-color-typography-positive
--ui-kit-color-typography-info
--ui-kit-color-typography-warn
--ui-kit-color-typography-critical
--ui-kit-color-typography-critical-hover
--ui-kit-color-typography-critical-active
--ui-kit-color-typography-link
--ui-kit-color-typography-link-hover
--ui-kit-color-typography-link-active

Used to group content or create separation between sections of content. Used in form elements, around media, and more.

Functional color (CSS variable name)Dark themeLight theme
--ui-kit-color-border
--ui-kit-color-border-hover
--ui-kit-color-border-active
--ui-kit-color-border-disabled
--ui-kit-color-border-critical
--ui-kit-color-border-low
--ui-kit-color-border-strong

Used for different elevations of background surfaces. We have 4 levels — 1 being the lowest and 4 being the highest — which makes it possible to achieve the visual outcomes desired in the product. Used for page backgrounds, dialogs, flyouts, and more.

Functional color (CSS variable name)Dark themeLight theme
--ui-kit-color-background-1
--ui-kit-color-background-2
--ui-kit-color-background-3
--ui-kit-color-background-4