Skip to main content

Module synth

Module synth 

Source
Expand description

Palette synthesis from brand seed colors.

Given a primary (plus optional role overrides) and a light/dark scheme, this derives the full theme colour contract — surfaces, every role with a readable .content foreground, and status colours — picking foregrounds by APCA (WCAG 3) contrast so text on any role is legible by construction.

Structs§

PaletteSpec
Brand input: a primary plus optional overrides. Unset roles are derived.

Enums§

Scheme
Light or dark base scheme.

Constants§

PALETTE_ORDER
The ordered token-id suffixes every synthesized palette emits. Each entry is the part after color. — e.g. "base.100", "primary.content".

Functions§

synth_palette
Derive the full ordered palette as (id-suffix, rgb) pairs, in PALETTE_ORDER. The id suffix is the part after color..

Type Aliases§

Rgb
An sRGB colour triple.