Skip to content
hateitall

Color Palette Generator

Turn one brand colour into a full, evenly stepped palette you can paste straight into your CSS or design tokens.

Processed locallyIn: Colour, HEX, CSS colourOut: CSS, JSON, SCSS, SVG, PNG

Loading tool…

How to use color palette generator

  1. Enter your base colour.

  2. Choose a 50 to 950 scale, a colour harmony, or tints and shades.

  3. Click any swatch to copy its HEX value.

  4. 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.

HEX, RGB, HSL, OKLCH, OKLab, Lab and P3 with gamut warnings

Colour · HEX · CSS colour→ HEXLight on device

WCAG 2 ratio with AA and AAA results, plus a suggested fix

Colour · HEX · CSS colour→ Contrast ratioLight on device

Simulate a palette for four colour blindness types and flag clashing pairs

Colour list · HEX · CSS colour→ Simulated paletteLight on device

Turn a photo into a palette with CSS, Tailwind and JSON code

PNG · JPEG · WebP +→ CSSLight on device

Linear, radial and conic gradients with OKLCH blending, CSS and PNG

Colour→ CSSLight on device