Expand description
An application’s own colours.
A theme picks a design system and a scheme, and until this existed that was the whole of what an application could say about colour. The only way to paint a brand colour was a literal on every node, and a literal is a colour the design system never sees: the pressed layer, the disabled fade, the tint of glass and the switch to dark all carried on without it.
A Palette replaces the value of colour roles, one role and one scheme at a time, and
nothing else. The shape, type, spacing, elevation, motion and component rules stay the
design system’s, so the same brand orange is a large rounded ripple under Material 3 and
a glass capsule under Liquid Glass. What crosses the boundary is a short list of role
values, never a token table.
Both schemes travel at once. When the platform turns dark the Renderer chooses from what it already holds, and the Host hears nothing.
Structs§
- Palette
- The colours one application gives some of the roles, per scheme.
- Palette
Entry - One role’s colour in one scheme, as it travels.
Enums§
- Palette
Problem - What is wrong with one entry of a palette that arrived over the wire.
- Palette
Violation - A pair a palette leaves short, as
Palette::checkreports it.
Constants§
- INK_
PAIRS - Every fill whose ink the Renderer may choose, with the contrast that pair is held to.
- PALETTE_
ENTRY_ LEN - Bytes of one palette entry on the wire: the role, the scheme, and the colour.
Functions§
- decode_
palette - Reads a palette off the wire, keeping every entry that is sound.
- ink_for
- The ink for a fill the application changed and whose ink it left alone.