HEX, RGB, HSL, OKLCH, OKLab, Lab and P3 with gamut warnings
Color Palette Generator
Turn one brand colour into a full, evenly stepped palette you can paste straight into your CSS or design tokens.
Loading tool…
How to use color palette generator
Enter your base colour.
Choose a 50 to 950 scale, a colour harmony, or tints and shades.
Click any swatch to copy its HEX value.
Set a name prefix and format, then copy the code or download it, or save the swatches as SVG or PNG.
What this tool does
- Builds an 11 step scale on a fixed OKLCH lightness ramp, with chroma easing off at the light and dark ends where screens run out of colour.
- Can keep your exact colour at its closest step, so the brand value appears unchanged in the scale.
- Makes complementary, analogous, triadic, split complementary, rectangle, square and monochrome sets by rotating hue in OKLCH.
- Exports CSS custom properties in HEX or OKLCH, Tailwind style JSON, SCSS variables, an SVG swatch sheet and a PNG.
How the result is verified
Each swatch is gamut mapped and then read back from its HEX value, so the OKLCH numbers shown are those of the exported colour. The PNG is decoded again and its size checked before download.
Frequently asked questions
Why use OKLCH for the scale instead of HSL?
HSL lightness is not perceptual: a yellow and a blue at 50% lightness look very different in brightness. OKLCH lightness is designed to match what people see, so step 500 of a blue scale and step 500 of a yellow scale feel equally strong.
Can I use the JSON in Tailwind?
Yes. The JSON is shaped like Tailwind's colour config: an object named after your prefix with keys 50 to 950. Paste it under theme.extend.colors.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
WCAG 2 ratio with AA and AAA results, plus a suggested fix
Simulate a palette for four colour blindness types and flag clashing pairs
Turn a photo into a palette with CSS, Tailwind and JSON code
Linear, radial and conic gradients with OKLCH blending, CSS and PNG