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 how primary
actions, selection and “on” states show. 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
- How primary actions, selection and “on” states show.
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.
- TINTED_
LIFT_ CHROMA - Chroma of the selection lift under
Emphasis::Tinted.