How it works
Every keystroke in the control pane runs the exact pipeline described in DESIGN.md:
generateRamp(hex, 18)interpolates from black through your color to white in Oklab space, sampled through a rational warp curve tuned so the WCAG 4.5 contrast pair lands at index distance 9 (K_ideal = ⌈0.501 × 17⌉) — not by convention, by construction.generateThemerepeats this per role and finds eachbaseTonesindex by nearest CIEDE2000 match to your original input, sothemeColor(l, "base", role)still resolves to (approximately) the color you actually picked. Font sizes and densities pass through as-is — they're already the valuesthemeSize()/themeDensity()consume directly.setTheme(name, theme)+themeApply()register light and dark siblings under isolated theme names so the site chrome is never touched — ramps, contrast checks, and the component gallery update through real CSS custom properties.- Contrast feedback uses
contrastRatio(WCAG 2.1) on live generated ramps; ramp quality scores come from the palette engine'sRamp.score.
Reset restores default role colors; Randomize explores freely; Harmony fills every role from the current primary via a simple hue-wheel scheme. Copy setTheme() snippet pastes the current ThemeInput into your app under the name you set.
Read next: generateRamp · Palette · DESIGN.md