The three documentation layers
Layer 1 — Base palette: raw colors before semantic assignment. Document each base color with its hex value, OKLCH coordinates, and a plain-language description of its perceptual quality. No use-context at this layer — just what the color looks and feels like. This is the reference layer for designers and brand teams. Layer 2 — Semantic tokens: the mapping from base colors to functional roles. Document each semantic token with: (a) the base color in the default theme, (b) the base color in dark mode, (c) the use constraint ('never use as text on white — contrast ratio 2.1:1'), and (d) the intended context ('hover states on secondary interactive elements only'). This is the reference layer for engineers. Layer 3 — Composition rules: documented patterns for how tokens combine. Examples: 'action-primary on surface-default: always meets WCAG AA 4.5:1'; 'status-error on surface-default: meets WCAG AA for large text only (3:1), do not use for body-size error labels'. This is the reference layer for QA and accessibility reviewers.
