Tokens
Drive consistency through color – Apply colors to maintain visual harmony and brand recognition.
Color
Colour comes in two layers. The palettes are raw material — ten hues, eight shades each. The semantic tokens name roles, and each role points at a shade, separately per colour scheme. Application code and component styles use the roles; only the theme uses the shades.
Every swatch below is read from base-colors.ts at build time, so this page
cannot drift from the palette.
Palettes
The design system defines eight shades per hue, numbered 10 to 80. Mantine requires ten. The mapping duplicates at both ends: index 0 repeats shade 10, indices 1 to 8 carry shades 10 to 80, index 9 repeats shade 80.
That means blue-0 and blue-1 are the same colour, and so are blue-8 and
blue-9. The duplicates are marked below rather than hidden — picking one
thinking it is a distinct step is the mistake this ramp invites.
Three greys, not one. dark-grey carries text and dark-scheme surfaces,
light-grey carries borders and controls, warm-grey carries page background
and raised surfaces in light mode.
Semantic tokens
These are what components reference. The two columns are what each role resolves to in each scheme — note how many of them re-point rather than invert. One family is the exception and has a single column: the app header is dusk in both schemes, so its tokens hold one value each.
Surface and text
| Token | Light | Dark |
|---|---|---|
--mantine-color-body | warm-grey-1 | dark-grey-8 |
--mantine-color-surface | white | dark-grey-7 |
--mantine-color-surface-grey | light-grey-1 | dark-grey-6 |
--mantine-color-surface-raised | warm-grey-1 | dark-grey-6 |
--mantine-color-text | dark-grey-7 | light-grey-1 |
--mantine-color-dimmed | black at 57% | white at 57% |
--mantine-color-placeholder | light-grey-6 | light-grey-5 |
--mantine-color-default-border | light-grey-3 | dark-grey-3 |
surface, with text on it
surface-grey
Flip the colour scheme in the navbar — the specimens above are live, and follow it the same way a real interface does.
Button
Buttons are blue in light mode and teal in dark mode. In light mode the ramp darkens from rest to pressed under a white label. In dark mode it lightens under a dark label.
| Token | Light | Dark |
|---|---|---|
--mantine-color-button | blue-5 | teal-5 |
--mantine-color-button-hover | blue-6 | teal-4 |
--mantine-color-button-pressed | blue-7 | teal-3 |
--mantine-color-button-text | blue-5 | teal-5 |
--mantine-color-button-text-inverted | white | dark-grey-7 |
--mantine-color-button-border | blue-5 | teal-5 |
--mantine-color-button-surface-hover | blue-1 | teal-5 at 10% |
--mantine-color-button-surface-pressed | blue-2 | teal-5 at 20% |
Status
| Token | Light | Dark |
|---|---|---|
--mantine-color-error | red-7 | red-3 |
--mantine-color-error-border | red-5 | red-5 |
--mantine-color-text-warning | red-7 | red-3 |
--mantine-color-text-success | green-7 | green-1 |
--mantine-color-disabled | light-grey-2 | dark-grey-6 |
--mantine-color-disabled-color | light-grey-5 | dark-grey-1 |
App header
The application header is dusk in both colour schemes, so this family is scheme-neutral: one value each, defined once, in neither the light nor the dark block. Each token mirrors the dark value of the role it stands for, which is what keeps the bar from drifting away from dark mode as those roles change.
| Token | Both schemes | Mirrors |
|---|---|---|
--mantine-color-appheader | dark-grey-7 | surface |
--mantine-color-appheader-raised | dark-grey-6 | surface-raised |
--mantine-color-appheader-text | light-grey-1 | text |
--mantine-color-appheader-icon | light-grey-6 | icon-default |
--mantine-color-appheader-accent | teal-5 | accent |
--mantine-color-appheader-surface-hover | dark-grey-5 | button-surface-neutral-hover |
--mantine-color-appheader-surface-pressed | dark-grey-4 | button-surface-neutral-pressed |
--mantine-color-appheader-border | dark-grey-3 | default-border |
--mantine-color-appheader-surface-muted | dark-grey-5 | — see below |
--mantine-color-appheader-surface-muted-hover | dark-grey-4 | — see below |
The last two mirror no dusk role, because the design has none to mirror. They
mark a read row in the messages panel, which is the one place in the
bar where a surface carries state rather than interaction. Figma draws that panel
on a light page as well, where the split is Color/Surface/Warm 10 against white
— a palette shade, scheme-neutral, so it does not flip to a dark value the way
every other token here does. What survives the translation is the direction: an
unread row keeps the panel's own flat and a read row lifts one step off it, so
read is the lighter of the two in either scheme.
Note that -surface-muted is the same dark-grey-5 as -surface-hover. One
shade, two roles — which is exactly why the hover partner is a token of its own
rather than a reuse of -surface-pressed: a read row already sits where an
ordinary hover would take it, so hovering it has to move one step further.
The semantic roles cannot be used inside the bar at all. They flip with the page,
and Mantine emits its scheme blocks root-anchored
(:root[data-mantine-color-scheme='dark'], :host(...)), so
data-mantine-color-scheme cannot be scoped to a subtree either — a dark island
on a light page has to be built from tokens that do not move.
Primary
theme.primaryColor is blue, and theme.primaryShade is { light: 5, dark: 7 }.
In dark mode the primary colour is teal-5 instead: --mantine-color-primary,
--mantine-primary-color-* and the --mantine-color-blue-filled, -light and
-outline variables all resolve to teal there. Components left on their default
colour therefore turn teal in dark mode. The blue-0 to blue-9 shades
themselves do not change.
Contrast
Contrast in this design system is measured with APCA (Lc), not the WCAG 2.x ratio. Accessibility carries the substitution, the full threshold table and the rules for measuring.
What it means for the palettes above: APCA is directional, so the same pair scores differently as dark-on-light and as light-on-dark. That is why every table on this page lists both schemes rather than one plus an inversion rule — a shade approved in light is unverified in dark.