Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Builds perceptually-uniform OKLCH color palettes and elevation-based depth systems with WCAG/APCA contrast checks and CSS tokens.
73% 91%+18 ptsof test cases passed
Passed 20 of 22 test cases with the skill, and 16 of 22 without it.
3 of 3 safety checks passed
A design system's color and depth layers must be perceptually engineered, not hand-picked. This skill gives the math, the tokens, and the CSS to ship palettes that stay accessible across light/dark, sRGB/P3, and every screen.
| Model | Axes | Strength | Fatal flaw | Use for |
|---|---|---|---|---|
| HEX / RGB | r,g,b | Universal, gamut-true | Not human-legible; no perceptual ops | Storage, final output |
| HSL / HSV | h,s,l/v | Easy mental model | L is not perceptual — hsl(60 100% 50%) (yellow) and hsl(240 100% 50%) (blue) both "50%" but yellow is ~6× brighter | Quick tweaks only — never for ramps |
| LCH / Lab (CIE) | L,C,h | Perceptually uniform | Hue shifts (blue→purple) on lightness change | Print, legacy perceptual work |
| OKLCH / OKLab | L,C,h | Perceptually uniform, no hue shift, predictable | Newer; needs fallback for old browsers | Palette generation, the default |
Why OKLCH wins for palettes: equal steps in L look equally spaced to the eye, and changing L or C does not drift the hue. HSL's lightness lies — that is the #1 cause of muddy, uneven ramps. Author in OKLCH, ship HEX/RGB fallbacks.
/* Same hue, even perceptual lightness steps — looks like a real ramp */
--blue-300: oklch(0.78 0.12 250);
--blue-500: oklch(0.62 0.16 250);
--blue-700: oklch(0.46 0.14 250);
--brand: #4f46e5; /* sRGB fallback */
@supports (color: color(display-p3 1 1 1)) {
--brand: oklch(0.52 0.21 274); /* richer on P3 screens */
}
Browsers clamp out-of-gamut OKLCH back into the device gamut automatically, so OKLCH authoring is gamut-safe by default.
Tokens flow primitive → semantic → component. Never let a component reference a primitive directly.
1. Primitive ramps (raw, 50–950). One ramp per hue family + a neutral ramp. 11 steps. Generate by holding C/h roughly constant and stepping L evenly in OKLCH.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.