Skip to main content

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

950
900
800
700
600
500
400
300
200
100
50

Accent

950
900
800
700
600
500
400
300
200
100
50

Info

950
900
800
700
600
500
400
300
200
100
50

Important

950
900
800
700
600
500
400
300
200
100
50

Success

950
900
800
700
600
500
400
300
200
100
50

Danger

950
900
800
700
600
500
400
300
200
100
50

Warning

950
900
800
700
600
500
400
300
200
100
50

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

950
900
800
700
600
500
400
300
200
100
50

Amber

950
900
800
700
600
500
400
300
200
100
50

Lime

950
900
800
700
600
500
400
300
200
100
50

Emerald

950
900
800
700
600
500
400
300
200
100
50

Sky

950
900
800
700
600
500
400
300
200
100
50

Purple

950
900
800
700
600
500
400
300
200
100
50

Fuchsia

950
900
800
700
600
500
400
300
200
100
50

Pink

950
900
800
700
600
500
400
300
200
100
50

Rose

950
900
800
700
600
500
400
300
200
100
50

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.

Red

950
900
800
700
600
500
400
300
200
100
50

Orange

950
900
800
700
600
500
400
300
200
100
50

Yellow

950
900
800
700
600
500
400
300
200
100
50

Green

950
900
800
700
600
500
400
300
200
100
50

Teal

950
900
800
700
600
500
400
300
200
100
50

Cyan

950
900
800
700
600
500
400
300
200
100
50

Blue

950
900
800
700
600
500
400
300
200
100
50

Indigo

950
900
800
700
600
500
400
300
200
100
50

Violet

950
900
800
700
600
500
400
300
200
100
50