Summit
Foundations

Color

Color sets a variable with a light and a dark value for each surface, action, state, and status.

Summit keeps the variable names of shadcn’s base-nova style and adds success and warning. accent has a new purpose: it marks state.

Surfaces and Text

A surface variable fills an area, and its -foreground partner colors the text on it. background pairs with foreground.

Aa
backgroundoklch(1 0 0)
Aa
cardoklch(1 0 0)
Aa
popoveroklch(1 0 0)
Aa
secondaryoklch(0.95 0.006 75.4)
Aa
mutedoklch(0.964 0.003 106.4)
VariablePurpose
background, foregroundThe page and its text
card, card-foregroundA Card, an Alert, and an Attachment
popover, popover-foregroundA floating surface, such as a Dialog, a Sheet, a menu, or a toast
secondary, secondary-foregroundThe secondary Button and Badge, and the highlighted row of a menu or a list
mutedA hover fill, the track of a Slider or a Progress bar, and a Skeleton
muted-foregroundText that ranks below the body on any of these surfaces: a description or a placeholder

Actions and State

primary is for actions, and accent is for state.

Aa
primaryoklch(0.197 0.016 296.4)
Aa
accentoklch(0.44 0.18 284)
ringoklch(0.44 0.18 284)
VariablePurpose
primary, primary-foregroundThe default Button and Badge, and the fill of a Progress bar
accent, accent-foregroundWhat is on or selected: a checked Checkbox or radio, a Switch when it is on, a Slider’s range, a selected day, and a checked choice card
ringThe focus outline, 1px on the edge of the focused control

Lines

border divides content. input is the edge of a control.

borderoklch(0.935 0.007 80.7)
inputoklch(0.621 0.034 302)
VariablePurpose
borderA Separator, the line under a Table row, and the edge of an outline Badge
inputThe edge of a Checkbox and a radio, the track of a Switch when it is off, the handle of the Resizable component, and the thumb of a Scroll Area. At a lower strength, the edge of a text field’s box and of an outline Button or Toggle

Status

A status variable has no -foreground partner. It colors a tint, a dot, or an icon. destructive also colors error text.

destructiveoklch(0.51 0.175 22)
successoklch(0.47 0.09 165)
warningoklch(0.77 0.154 75)
VariablePurpose
destructiveAn error or a loss: error text, the border of an invalid field, the destructive Button and menu item, and a Badge’s tint and dot
successA good outcome: a Badge’s tint and dot, and the icon of an Alert or a toast
warningA state that needs attention: a Badge’s tint and dot, and the icon of an Alert or a toast

Charts

chart-1 to chart-5 color the series of a chart. They are the first five colors of IBM Carbon’s categorical palette, in Carbon’s order.

chart-1oklch(0.4679 0.2189 295.08)
chart-2oklch(0.6406 0.1623 246.51)
chart-3oklch(0.4331 0.0739 194.77)
chart-4oklch(0.4649 0.1723 1.34)
chart-5oklch(0.6662 0.2088 22.13)

The Sidebar has variables of its own. Its surface is sidebar, not background, and sidebar-accent is a neutral fill, unlike accent.

Aa
sidebaroklch(0.964 0.003 106.4)
Aa
sidebar-primaryoklch(0.197 0.016 296.4)
Aa
sidebar-accentoklch(0.885 0.01 72.7)
sidebar-borderoklch(0.935 0.007 80.7)
sidebar-ringoklch(0.44 0.18 284)
VariablePurpose
sidebar, sidebar-foregroundThe Sidebar’s surface and its text
sidebar-primary, sidebar-primary-foregroundA filled mark in the Sidebar, such as the square with a workspace’s initials
sidebar-accent, sidebar-accent-foregroundThe item under the pointer and the active item
sidebar-borderThe Sidebar’s edge and its separators
sidebar-ringThe focus outline of a control in the Sidebar

Rules

Apply these rules when you override a class or build a surface outside the registry.

Primary and Accent

Fill an action with primary and a state with accent. A checked Checkbox next to a filled Button stays distinct because the two have different colors.

DoUse accent for a checked control and primary for the Button.
Don’tWhen a checked control is filled with primary, it matches the Button next to it, so users see the setting as a second action.

Highlighted Rows

Use secondary for the row under the pointer or the arrow keys in a menu, a Select, or a Combobox. The fill moves with the pointer and doesn’t mark anything as on, so accent isn’t used.

Control Edges

A Checkbox and a radio have nothing but their edge to be found by, so keep that edge in input, which has the 3 to 1 that WCAG 2.2 SC 1.4.11 Non-text Contrast requires for the edge that identifies a control. The box of a text field has a fainter edge, below that floor.

Warning Text

warning is too light for text on a light surface. Tint with it and keep the label in foreground, as the warning Badge does.

DoTint the Badge and keep the label in foreground.
Don’tWhen the label is set in warning, users with low vision can’t read the status.

Chart Order

Use chart-1 for the first series of a Chart, chart-2 for the second, and continue in order. Carbon arranges the sequence so that each color contrasts most with its neighbors.

Raw Values

Reach a color through its variable. tokens.css sets a light and a dark value for every color variable. A hex value or a Tailwind palette color, such as bg-indigo-600, has one value, so it stays the same when the theme changes. Avoid adding a variable.

Accessibility

See Accessibility for the contrast floors for text and for a mark. The ratios in this table are computed from tokens.css, and a production build fails if a pair falls below its floor. A pair that isn’t in the table isn’t checked.

Text or MarkSurfaceLightDarkFloor
foregroundbackgroundAa18.25Aa14.794.5
card-foregroundcardAa18.25Aa14.514.5
popover-foregroundpopoverAa18.25Aa14.514.5
primary-foregroundprimaryAa16.84Aa16.844.5
secondary-foregroundsecondaryAa15.77Aa12.214.5
muted-foregroundmutedAa4.84Aa6.304.5
accent-foregroundaccentAa7.73Aa5.384.5
sidebar-foregroundsidebarAa16.45Aa15.374.5
sidebar-primary-foregroundsidebar-primaryAa16.84Aa16.844.5
sidebar-accent-foregroundsidebar-accentAa12.91Aa12.214.5
muted-foregroundbackgroundAa5.37Aa7.634.5
muted-foregroundcardAa5.37Aa7.494.5
muted-foregroundpopoverAa5.37Aa7.494.5
destructivebackgroundAa6.30Aa8.334.5
successbackgroundAa6.50Aa10.504.5
chart-1background7.733.763
chart-2background3.337.953
chart-3background7.713.773
chart-4background7.697.983
chart-5background3.355.613
inputbackground3.663.503
ringbackground8.385.553
accentbackground8.385.553

Color can’t be the only sign of a status, so a status Badge has a label, an Alert pairs its colored icon with a title, and an invalid Field shows an error message with its destructive border.

In Code

A value changes under a .dark ancestor, so a class doesn’t need a dark: variant unless its alpha differs between themes.

<section className="bg-card text-card-foreground">
    <p className="text-muted-foreground">48 invoices this year.</p>
    <span className="bg-success/15 dark:bg-success/25">Paid</span>
</section>

Outside a class, read the variable: for a chart series, set color: 'var(--chart-1)'.

Reference

tokens.css declares these colors.

VariableLightDark
Surfaces
--backgroundoklch(1 0 0)oklch(0.181 0.017 301.9)
--cardoklch(1 0 0)oklch(0.192 0.024 295.5)
--popoveroklch(1 0 0)oklch(0.192 0.024 295.5)
--primaryoklch(0.197 0.016 296.4)oklch(0.973 0.018 64.9)
--secondaryoklch(0.95 0.006 75.4)oklch(0.262 0.025 298.8)
--mutedoklch(0.964 0.003 106.4)oklch(0.262 0.025 298.8)
--accentoklch(0.44 0.18 284)oklch(0.65 0.16 284)
Text
--foregroundoklch(0.197 0.016 296.4)oklch(0.92 0.014 308.3)
--card-foregroundoklch(0.197 0.016 296.4)oklch(0.92 0.014 308.3)
--popover-foregroundoklch(0.197 0.016 296.4)oklch(0.92 0.014 308.3)
--primary-foregroundoklch(0.973 0.018 64.9)oklch(0.197 0.016 296.4)
--secondary-foregroundoklch(0.197 0.016 296.4)oklch(0.92 0.014 308.3)
--muted-foregroundoklch(0.528 0.026 302.6)oklch(0.724 0.027 303.3)
--accent-foregroundoklch(0.973 0.018 64.9)oklch(0.197 0.016 296.4)
Lines
--borderoklch(0.935 0.007 80.7)oklch(0.262 0.025 298.8)
--inputoklch(0.621 0.034 302)oklch(0.528 0.026 302.6)
--ringoklch(0.44 0.18 284)oklch(0.65 0.16 284)
Status
--destructiveoklch(0.51 0.175 22)oklch(0.76 0.12 22)
--successoklch(0.47 0.09 165)oklch(0.8 0.1 165)
--warningoklch(0.77 0.154 75)oklch(0.83 0.13 76)
Charts
--chart-1oklch(0.4679 0.2189 295.08)oklch(0.5737 0.2579 294.89)
--chart-2oklch(0.6406 0.1623 246.51)oklch(0.7287 0.1549 241.66)
--chart-3oklch(0.4331 0.0739 194.77)oklch(0.5324 0.0917 190.84)
--chart-4oklch(0.4649 0.1723 1.34)oklch(0.7559 0.1672 354.52)
--chart-5oklch(0.6662 0.2088 22.13)oklch(0.6662 0.2088 22.13)
Sidebar
--sidebaroklch(0.964 0.003 106.4)oklch(0.156 0.021 288.3)
--sidebar-foregroundoklch(0.197 0.016 296.4)oklch(0.92 0.014 308.3)
--sidebar-primaryoklch(0.197 0.016 296.4)oklch(0.973 0.018 64.9)
--sidebar-primary-foregroundoklch(0.973 0.018 64.9)oklch(0.197 0.016 296.4)
--sidebar-accentoklch(0.885 0.01 72.7)oklch(0.262 0.025 298.8)
--sidebar-accent-foregroundoklch(0.197 0.016 296.4)oklch(0.92 0.014 308.3)
--sidebar-borderoklch(0.935 0.007 80.7)oklch(0.262 0.025 298.8)
--sidebar-ringoklch(0.44 0.18 284)oklch(0.65 0.16 284)

On this page