OKLCH colour palette generator
Start from your brand colour and get full ramps (50 to 900) with even steps, contrast badges on every swatch, and a live interface in light and dark mode. Export tokens you can paste.
- Free, no sign-up
- Runs in your browser
- Saves as you go
Select a swatch to copy its value. Badges show WCAG 2 contrast with white (W) and black (B) text; struck-through values fail 3:1.
How to use it
- Paste your brand colour
Type or pick a hex. The tool finds the step where it belongs and builds the ramp around it.
- Add the ramps you need
A neutral tinted from your brand, plus success, warning, danger and info.
- Check it on a screen
Switch the preview between light and dark, then export or carry on to the contrast checker.
Why OKLCH instead of HSL
In HSL, "50% lightness" doesn't look equally light across hues: yellow at 50% is far brighter than blue at 50%. Ramps built in HSL end up with uneven steps, and contrast changes unpredictably from one colour to the next. OKLCH is designed so that equal changes in lightness look like equal changes to people, so a 500 in blue and a 500 in green behave alike.
| What you want | In HSL | In OKLCH |
|---|---|---|
| Even steps from 50 to 900 | Hand-tuned per hue | One lightness curve for every hue |
| Predictable text contrast | Varies by hue | Similar at the same step |
| A new status colour | Re-tune the whole ramp | Change the hue; the curve stays |
| Wide-gamut screens | sRGB only | Display P3 where supported |
How the ramps are built
Every ramp shares one lightness curve, from your lightest to your darkest setting, so the same step has about the same lightness in every hue. Chroma (colourfulness) peaks in the middle of the ramp and tapers at both ends, then each colour is fitted into the sRGB or P3 gamut without changing its lightness. If you paste a brand colour, it's pinned to the step with the closest lightness, so your exact hex appears in the system.
Using the ramps in a design system
Ramps are primitive tokens: raw values with neutral names like color-brand-600. Product code shouldn't use them directly. Map them to semantic tokens that name a job (color-action-primary → brand-600), so dark mode and rebrands become a change of mapping, not a hunt through every screen.
Questions
What is an OKLCH colour palette?
A set of colour ramps defined in OKLCH, a colour space where lightness matches how bright colours look to people. It gives evenly spaced steps and more predictable contrast than HSL.
Will my exact brand colour be in the palette?
Yes, if you keep “Keep my exact colour at the closest step” on. Your hex replaces the generated colour at the step with the closest lightness.
Can I use the palette with Tailwind?
Yes. Export as Tailwind to get a colours object for tailwind.config.js, or as CSS variables you can reference from a Tailwind v4 theme.
What is Display P3?
A wider colour gamut supported by most modern phones and laptops. Choosing P3 adds oklch() values for those screens, with the sRGB hex as a fallback.
Is it free?
Yes. It runs entirely in your browser, needs no account, and saves your work locally.
Our two-week audit turns your real screens into a token plan, a first-components list and a rollout plan.