Colors

Every color token in light and dark mode, with the contrast of each pair. Every text pair passes WCAG AA, and a test checks them whenever a value changes.

Color tokens

Each token below, in light and in dark. The number in each swatch is its contrast: text on its fill needs 4.5:1, and a focus ring, a field border or a chart mark needs 3:1 on the page. Every pair passes WCAG AA in both themes, and a test checks it whenever a value changes. To change one, follow Change a color.

Page and text

TokenLightDarkUsed for
--background--foreground
20.1:1, needs 4.5:1
19.2:1, needs 4.5:1
The page and the text on it.
--card--card-foreground
20.1:1, needs 4.5:1
17.0:1, needs 4.5:1
Card and Alert. A step above the page in dark.
--popover--popover-foreground
20.1:1, needs 4.5:1
17.0:1, needs 4.5:1
Everything that floats: menus, Select, Combobox, Popover, Dialog, Toast.
--muted--muted-foreground
6.8:1, needs 4.5:1
5.6:1, needs 4.5:1
Quiet fills (a read-only field, the Progress track); its text is the secondary text everywhere.

Actions

TokenLightDarkUsed for
--primary--primary-foreground
17.0:1, needs 4.5:1
17.0:1, needs 4.5:1
The default Button, a checked Checkbox, Radio and Switch, the selected day, the Slider.
--secondary--secondary-foreground
16.1:1, needs 4.5:1
15.6:1, needs 4.5:1
The secondary Button, a neutral Badge, the Avatar fallback.
--accent--accent-foreground
18.2:1, needs 4.5:1
15.6:1, needs 4.5:1
Hover on anything without a fill of its own: outline and ghost buttons, menu items, Toggle.
--accent-primary--accent-primary-foreground
6.8:1, needs 4.5:1
5.2:1, needs 4.5:1
The blue Button (variant="accent"), for an action that should stand out.
--soft--soft-foreground
14.6:1, needs 4.5:1
11.8:1, needs 4.5:1
The raised surface: soft buttons, fields, the selected tab.
--brand--brand-foreground
9.3:1, needs 4.5:1
9.3:1, needs 4.5:1
The Yolk color. Small highlights only, as a fill: as text it is too light.

Status

TokenLightDarkUsed for
--success--success-foreground
5.3:1, needs 4.5:1
7.8:1, needs 4.5:1
Done, saved, online.
--info--info-foreground
6.4:1, needs 4.5:1
5.1:1, needs 4.5:1
Something to know, with nothing wrong.
--warning--warning-foreground
5.4:1, needs 4.5:1
6.5:1, needs 4.5:1
Needs attention soon.
--destructive--destructive-foreground
6.0:1, needs 4.5:1
5.4:1, needs 4.5:1
Errors, an invalid field, actions that delete.
--success-subtle--success-subtle-foreground
6.6:1, needs 4.5:1
9.9:1, needs 4.5:1
A quiet tint for dense lists: a subtle Badge, an Alert.
--info-subtle--info-subtle-foreground
8.1:1, needs 4.5:1
7.9:1, needs 4.5:1
The quiet tint of info.
--warning-subtle--warning-subtle-foreground
6.4:1, needs 4.5:1
9.1:1, needs 4.5:1
The quiet tint of warning.
--destructive-subtle--destructive-subtle-foreground
6.5:1, needs 4.5:1
8.1:1, needs 4.5:1
The quiet tint of destructive.
--accent-subtle--accent-subtle-foreground
7.2:1, needs 4.5:1
8.1:1, needs 4.5:1
The quiet tint of the blue.
--brand-subtle--brand-subtle-foreground
8.1:1, needs 4.5:1
10.3:1, needs 4.5:1
The quiet tint of the brand.

Edges and focus

TokenLightDarkUsed for
--border
Lines and dividers: separators, Accordion, Tabs.
--hairline
The 1px edge of cards and popups, translucent so it reads on any fill.
--input
4.8:1, needs 3:1
4.1:1, needs 3:1
A field's border in shadcn components; YolkUI fields draw the soft ring instead.
--ring
17.7:1, needs 3:1
13.6:1, needs 3:1
The focus outline on every control.

Charts

TokenLightDarkUsed for
--chart-1
5.2:1, needs 3:1
7.6:1, needs 3:1
Series 1, blue. Each hue stands 3:1 off the page.
--chart-2
3.6:1, needs 3:1
10.4:1, needs 3:1
Series 2, emerald. Each hue stands 3:1 off the page.
--chart-3
3.1:1, needs 3:1
11.7:1, needs 3:1
Series 3, amber. Each hue stands 3:1 off the page.
--chart-4
4.5:1, needs 3:1
7.0:1, needs 3:1
Series 4, rose. Each hue stands 3:1 off the page.
--chart-5
5.8:1, needs 3:1
7.0:1, needs 3:1
Series 5, violet. Each hue stands 3:1 off the page.

Sidebar

TokenLightDarkUsed for
--sidebar--sidebar-foreground
19.2:1, needs 4.5:1
17.0:1, needs 4.5:1
An app sidebar, a step off the page.
--sidebar-primary--sidebar-primary-foreground
17.0:1, needs 4.5:1
17.0:1, needs 4.5:1
The current item.
--sidebar-accent--sidebar-accent-foreground
16.1:1, needs 4.5:1
14.0:1, needs 4.5:1
Hover on an item.
--sidebar-border
Its edge and dividers.
--sidebar-ring
17.7:1, needs 3:1
13.6:1, needs 3:1
Focus inside it.

States and component tokens

Fills also have -hover, -active and -separator steps, and a few components have tokens of their own (--switch-*, --segment-*, --toggle-active). The full theme holds them all.