Summary
Move the Stratos color token values from RGB/hex to OKLCH. Tailwind v4 (^4.3.1, already in use) defines its default palette in OKLCH, so this aligns Stratos with Tailwind's own direction rather than fighting it.
Why
- Perceptually-uniform light/dark math. Dark mode done right is perceptual lightness inversion, not per-channel RGB inversion (
255-r produces garish results). In OKLCH that's simply L → 1−L (keep chroma/hue), plus optional C×0.5 and a small hue shift for an atmospheric dark palette. This makes paired light/dark token generation a known, small transform.
- Consistency with Tailwind v4, whose palette is already OKLCH.
- Unblocks the stb theming tool's OKLCH picker, which currently ships its
oklch format option disabled ("oklch (planned)") because there was no rgb→oklch conversion on the token path.
Scope
Notes
- hex→OKLCH→hex is mildly lossy at gamut edges — acceptable here (we're standardizing token values, and generating dark variants, not pixel-preserving a single color).
- Light/dark derivation math reference: standard OKLCH
invertLightness(l,c,h) = {l: 1−l, c, h} + chroma/hue adjustment.
Related: #5494 (semantic theme tokens), FWT-866/FWT-868 (token classes / dark-mode templates), theming/branding (stb) workstream.
Summary
Move the Stratos color token values from RGB/hex to OKLCH. Tailwind v4 (
^4.3.1, already in use) defines its default palette in OKLCH, so this aligns Stratos with Tailwind's own direction rather than fighting it.Why
255-rproduces garish results). In OKLCH that's simplyL → 1−L(keep chroma/hue), plus optionalC×0.5and a small hue shift for an atmospheric dark palette. This makes paired light/dark token generation a known, small transform.oklchformat option disabled ("oklch (planned)") because there was no rgb→oklch conversion on the token path.Scope
@themetoken definitions (and any remaining hardcoded hex) tooklch(...)values.Notes
invertLightness(l,c,h) = {l: 1−l, c, h}+ chroma/hue adjustment.Related: #5494 (semantic theme tokens), FWT-866/FWT-868 (token classes / dark-mode templates), theming/branding (stb) workstream.