Skip to main content

Module palette

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.
StatusTones
The four status tones. Their hues are STATUS_HUES.
SurfaceLadder
OKLCH lightness of every surface, 0 black to 1 white.
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.