

Collect, then map
The procedure starts by writing down eight things from the design system: palettes, semantic roles, modes, typography, spacing, radii and shadows, motion and breakpoints. Then each value is mapped onto a name the template already has. The design system’s own names, such as brand-teal-600, never become tokens: they stay constants in the theme package.
What the mapping looks like
Palettes become primitives on a 100 to 900 scale. Semantic roles become the eight roles every colour family declares, each with a light and a dark value. Dark is not a separate theme: it is the second value of each colour. Text styles map to the type roles, and the spacing scale to space 100 to 900.
Contrast is checked
A theme is checked when it loads: the colour pairs that carry text must reach their contrast ratio, and the heading emphasis colour must reach 3:1. A value with no token in the catalogue becomes a token of the one block that uses it, or a proposal to the catalogue, never a new global invented in a project.
Themes, in the demo
The Theming page, and every block style side by side.