Free Tailwind CSS Color Palette Generator

Generate a Tailwind CSS colour palette from one colour. Builds 50 to 950 shades in OKLCH and exports v4 @theme, v3 tailwind.config, CSS variables or JSON.

  • No upload, 100% private
  • Instant, in your browser
  • 100% free, no signup
Loading tool…
Read the complete guideHow to Add Custom Brand Colors to Tailwind CSS (v3 and v4) →

About the Tailwind Color Palette Generator tool

Tailwind CSS colours come in scales from 50 to 950, and a brand colour only feels native in a Tailwind project when it has the same range of light and dark steps. Picking eleven shades by eye usually ends in uneven jumps and muddy darks. This generator builds a full scale from a single colour.

It works in OKLCH, the perceptual colour space Tailwind v4 uses for its own palette. Each step's lightness follows a curve modelled on Tailwind's default colours, and chroma (colourfulness) is scaled from your base colour, so a muted grey-blue stays muted and a vivid orange stays vivid. Your exact colour is placed at the step whose lightness is closest, or at a step you choose, such as 500. Steps that fall outside the sRGB gamut have their chroma reduced until they fit, so every HEX value is exact. An optional hue shift makes the light and dark ends drift slightly warmer or cooler.

Export the scale as a Tailwind v4 @theme block with oklch() values, a v3 tailwind.config.js colours object, plain CSS variables or JSON. Everything is calculated in your browser.

How to use Tailwind Color Palette Generator

  1. Choose a “Base colour” with the picker or type a HEX code, or press “Random”.
  2. Give it a “Colour name” such as brand or primary.
  3. Leave “Base colour sits at” on Auto, or pin it to a specific step such as 500.
  4. Optionally adjust “Hue shift toward ends”.
  5. Click any swatch to copy its HEX, or copy an export from the Tailwind v4, v3, CSS variables or JSON tabs.

Features

OKLCH-based scale

Perceptually even steps from 50 to 950, like Tailwind's own palette.

Your colour kept exactly

The base colour appears unchanged at its step, marked on the swatch.

Gamut-safe HEX values

Out-of-gamut steps are desaturated rather than clipped, keeping hue and lightness.

Four export formats

Tailwind v4 @theme, v3 config, CSS custom properties and JSON.

Readable swatches

Each swatch labels itself in black or white, whichever has more contrast.

When to use it

  • Add a brand colour to a Tailwind project as bg-brand-500, text-brand-700 and so on.
  • Create matching hover, border and background shades for buttons.
  • Build a consistent colour scale for a design system outside Tailwind.
  • Generate dark-mode friendly light and dark variants of one colour.
  • Explore palettes quickly with the random colour button.

Frequently asked questions

Why does my colour appear at 400 or 600 instead of 500?

In Auto mode the colour is placed at the step whose lightness is closest to Tailwind's curve. Choose 500 under “Base colour sits at” to force it there.

How do I use the output in Tailwind v4?

Paste the @theme block into your main CSS file after @import "tailwindcss". Classes such as bg-brand-500 then work immediately.

And in Tailwind v3?

Copy the colours object into theme.extend.colors in tailwind.config.js. The DEFAULT key also enables bg-brand.

Why are some steps slightly less saturated?

Very light and very dark versions of vivid colours cannot be shown in sRGB. Chroma is reduced just enough to fit, and the note under the swatches tells you how many steps were adjusted.

Will it match Tailwind's built-in colours exactly?

No. Tailwind's colours were hand-tuned. This tool follows the same lightness pattern so your colour sits comfortably beside them.

Related tools