On September 25th, 2024, we released v2 of the Apps SDK. To learn what’s new and how to upgrade, see Migration FAQ and Migration guide.

Colors

An overview of colors in the App UI Kit.

Canva has a distinct and vibrant color palette. The App UI Kit exposes a subset of this palette as design tokens. You can use these colors to create a user interface that matches Canva's aesthetic.

Our design guidelines help you create a high-quality app that easily passes app review.

Using colors

The colors are exposed in the following formats:

  • CSS variables
  • JavaScript variables
  • React component props (with exceptions)

You can use the CSS and JavaScript variables as you would any other design token.

In the case of React component props, some props only accept specific colors. For example, the Alert component only accepts the following colors for the tone prop:

<Alert tone="info">This is an alert.</Alert>
<Alert tone="warn">This is an alert.</Alert>
<Alert tone="positive">This is an alert.</Alert>
<Alert tone="critical">This is an alert.</Alert>
TSX

These props are documented in Storybook(opens in a new tab or window) and available as autocomplete options via IntelliSense.

List of color tokens

Hierarchical

These colors are used to provide hierarchy around the product.

Primary

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

CSS variable
JavaScript variable
Dark theme
Light theme
--ui-kit-color-primary
colorPrimary
--ui-kit-color-primary-hover
colorPrimaryHover
--ui-kit-color-primary-active
colorPrimaryActive
--ui-kit-color-primary-disabled
colorPrimaryDisabled
--ui-kit-color-primary-fore
colorPrimaryFore
--ui-kit-color-primary-fore-disabled
colorPrimaryForeDisabled

Secondary

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

CSS variable
JavaScript variable
Dark theme
Light theme
--ui-kit-color-secondary
colorSecondary
--ui-kit-color-secondary-hover
colorSecondaryHover
--ui-kit-color-secondary-active
colorSecondaryActive
--ui-kit-color-secondary-disabled
colorSecondaryDisabled
--ui-kit-color-secondary-fore
colorSecondaryFore
--ui-kit-color-secondary-fore-disabled
colorSecondaryForeDisabled

Tertiary

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

CSS variable
JavaScript variable
Dark theme
Light theme
--ui-kit-color-tertiary
colorTertiary
--ui-kit-color-tertiary-hover
colorTertiaryHover
--ui-kit-color-tertiary-active
colorTertiaryActive
--ui-kit-color-tertiary-disabled
colorTertiaryDisabled
--ui-kit-color-tertiary-fore
colorTertiaryFore
--ui-kit-color-tertiary-fore-disabled
colorTertiaryForeDisabled

Contrast

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

CSS variable
JavaScript variable
Dark theme
Light theme
--ui-kit-color-contrast
colorContrast
--ui-kit-color-contrast-hover
colorContrastHover
--ui-kit-color-contrast-active
colorContrastActive
--ui-kit-color-contrast-disabled
colorContrastDisabled
--ui-kit-color-contrast-fore
colorContrastFore
--ui-kit-color-contrast-fore-disabled
colorContrastForeDisabled

Tonal

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

Positive

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

CSS variable
JavaScript variable
Dark theme
Light theme
--ui-kit-color-positive
colorPositive
--ui-kit-color-positive-hover
colorPositiveHover
--ui-kit-color-positive-active
colorPositiveActive
--ui-kit-color-positive-disabled
colorPositiveDisabled
--ui-kit-color-positive-low
colorPositiveLow
--ui-kit-color-positive-fore
colorPositiveFore
--ui-kit-color-positive-fore-low
colorPositiveForeLow
--ui-kit-color-positive-fore-disabled
colorPositiveForeDisabled

Critical

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.

CSS variable
JavaScript variable
Dark theme
Light theme
--ui-kit-color-critical
colorCritical
--ui-kit-color-critical-hover
colorCriticalHover
--ui-kit-color-critical-active
colorCriticalActive
--ui-kit-color-critical-disabled
colorCriticalDisabled
--ui-kit-color-critical-low
colorCriticalLow
--ui-kit-color-critical-fore
colorCriticalFore
--ui-kit-color-critical-fore-low
colorCriticalForeLow
--ui-kit-color-critical-fore-disabled
colorCriticalForeDisabled

Warn

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

CSS variable
JavaScript variable
Dark theme
Light theme
--ui-kit-color-warn
colorWarn
--ui-kit-color-warn-hover
colorWarnHover
--ui-kit-color-warn-active
colorWarnActive
--ui-kit-color-warn-disabled
colorWarnDisabled
--ui-kit-color-warn-low
colorWarnLow
--ui-kit-color-warn-fore
colorWarnFore
--ui-kit-color-warn-fore-low
colorWarnForeLow
--ui-kit-color-warn-fore-disabled
colorWarnForeDisabled

Info

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

CSS variable
JavaScript variable
Dark theme
Light theme
--ui-kit-color-info
colorInfo
--ui-kit-color-info-hover
colorInfoHover
--ui-kit-color-info-active
colorInfoActive
--ui-kit-color-info-disabled
colorInfoDisabled
--ui-kit-color-info-low
colorInfoLow
--ui-kit-color-info-fore
colorInfoFore
--ui-kit-color-info-fore-low
colorInfoForeLow
--ui-kit-color-info-fore-disabled
colorInfoForeDisabled

Neutral

Used for neutral info, in areas such as badges.

CSS variable
JavaScript variable
Dark theme
Light theme
--ui-kit-color-neutral
colorNeutral
--ui-kit-color-neutral-hover
colorNeutralHover
--ui-kit-color-neutral-active
colorNeutralActive
--ui-kit-color-neutral-disabled
colorNeutralDisabled
--ui-kit-color-neutral-low
colorNeutralLow
--ui-kit-color-neutral-fore
colorNeutralFore
--ui-kit-color-neutral-fore-low
colorNeutralForeLow
--ui-kit-color-neutral-fore-disabled
colorNeutralForeDisabled

Contextual

These colors are used for specific use cases such as backgrounds, typography, and borders.

Background

Used for different elevations of background surfaces, such as page backgrounds, dialogs, flyouts, and more.

CSS variable
JavaScript variable
Dark theme
Light theme
--ui-kit-color-canvas
colorCanvas
--ui-kit-color-tabdock
colorTabdock
--ui-kit-color-page
colorPage
--ui-kit-color-surface
colorSurface

Border

Used to group content or create separation between sections of content.

CSS variable
JavaScript variable
Dark theme
Light theme
--ui-kit-color-border
colorBorder
--ui-kit-color-border-hover
colorBorderHover
--ui-kit-color-border-active
colorBorderActive
--ui-kit-color-border-disabled
colorBorderDisabled
--ui-kit-color-border-critical
colorBorderCritical
--ui-kit-color-border-low
colorBorderLow
--ui-kit-color-border-strong
colorBorderStrong

Overlay

Used to style an overlay, increasing the separation between the foreground and the background.

CSS variable
JavaScript variable
Dark theme
Light theme
--ui-kit-color-overlay
colorOverlay

Typography

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

CSS variable
JavaScript variable
Dark theme
Light theme
--ui-kit-color-typography-primary
colorTypographyPrimary
--ui-kit-color-typography-secondary
colorTypographySecondary
--ui-kit-color-typography-tertiary
colorTypographyTertiary
--ui-kit-color-typography-placeholder
colorTypographyPlaceholder
--ui-kit-color-typography-positive
colorTypographyPositive
--ui-kit-color-typography-info
colorTypographyInfo
--ui-kit-color-typography-warn
colorTypographyWarn
--ui-kit-color-typography-critical
colorTypographyCritical
--ui-kit-color-typography-critical-hover
colorTypographyCriticalHover
--ui-kit-color-typography-critical-active
colorTypographyCriticalActive
--ui-kit-color-typography-link
colorTypographyLink
--ui-kit-color-typography-link-hover
colorTypographyLinkHover
--ui-kit-color-typography-link-active
colorTypographyLinkActive