Colors
Mantle's color tokens follow the theme. Write the light-mode class, and dark mode comes with it.
Dark mode
Mantle styles with Tailwind but ships its own color palette. In dark mode, each ramp flips: blue-400 takes the light-mode blue-600 value, and blue-600 takes blue-400. A class such as bg-blue-600 keeps its contrast against the page in both themes, so it needs no dark: partner.
To set a different value in dark mode, add a dark: class as an override.
Variables
Each color is a CSS variable in the oklch() color space. Use it through a Tailwind class (text-blue-500) or read it directly (var(--color-blue-500)).
Black and white color variables
black and white are semantic colors, not literal ones. In dark mode, white resolves to black and black resolves to white. Switch the theme to see the swap:
This renders bg-white and color text-black.
The current applied theme is light
Functional colors
Use these colors for actions and states: accent for primary actions, and danger, warning, success, info, and important for the states they name. Use neutral for UI with no state.
Neutral
Accent
Info
Important
Success
Danger
Warning
Extended palette
Use these when a color carries no functional meaning. They're a subset of
Tailwind's palette, with a light and a dark value each. Tailwind's extra grays
(slate, zinc, and the rest) aren't included. Use mantle's gray instead.
Gray
Amber
Lime
Emerald
Sky
Purple
Fuchsia
Pink
Rose
Reserve palette
Use these colors when the extended palette runs out, as in a chart with many series. They match the rest of the palette less closely, so try the functional and extended colors first.