Module palette
Expand description
What a theme document says about colour (docs/design-language.md,
“Colour” and “Theming”).
A Palette is a temperature (one OKLCH hue and a chroma at or below
NEUTRAL_MAX_CHROMA), a lightness ladder for the six surfaces, three
ink tiers and four muted status tones. Emphasis decides which hue
the accent takes. Tone sets the lightness and
chroma of the presence palette, whose twelve hues never move. Everything
else (crate::tokens::Colors) is derived from these numbers in one
place, so a palette can only say what the design language lets it say.
Structs§
- InkLadder
- OKLCH lightness of the three ink tiers, defined on the content surface.
- Palette
- The neutral material and its inks.
- Status
Tones - The four status tones. Their hues are
STATUS_HUES. - Surface
Ladder - OKLCH lightness of every surface,
0black to1white. - Tone
- An OKLCH lightness and chroma at a hue the role fixes.
Enums§
- Emphasis
- Which hue the accent takes: primary actions, the selected row’s lift
tint, links, the focus ring, the caret and the text selection
(
docs/design-language.md, “Colour roles”). An “on” state is never the accent; it is the on-state green (crate::tokens::Intents::on_state).
Constants§
- NEUTRAL_
MAX_ CHROMA - Ceiling on the neutral material’s chroma. The neutrals carry a temperature, never a colour.
- PRESENCE_
CHROMA - See
PRESENCE_LIGHTNESS. - PRESENCE_
LIGHTNESS - The presence palette’s usable band: bright enough to read as colour, never so loud that one participant shouts.
- STATUS_
HUES - Status hues, in OKLCH degrees: danger, warning, success, info. A theme moves their lightness and chroma, never their meaning.
- STATUS_
MAX_ CHROMA - Ceiling on status chroma: danger, warning and success are muted.
- STOCK_
CHROMA - See
STOCK_HUE. - STOCK_
HUE - The stock neutral temperature: a cool hue at a whisper of chroma, so the material reads as considered rather than as sterile grey, never as grey-blue.
- SURFACE_
LIGHT - The light a surface catches: the specular sheen across a glass body and
the rim lit along its edge (
crate::tokens::Colors::light, read by the Glass painter set). - TINTED_
LIFT_ CHROMA - Chroma of the selection lift under an accent (
Emphasis::YouandEmphasis::Tinted).