Free tools that run in your browser. Use any tool without an account.

Favourites Cart
Sign in
Join free

Tailwind Color Generator

OKLCH 50 to 950

  • Free
  • Runs in your browser
  • No account needed

The generator creates an 11-step Tailwind color scale (50 to 950) in OKLCH from one seed, keeps your color at its nearest step and same hue, and exports Tailwind v4 @theme or v3 config; e.g., #ff6b6b.

Runs in your browser. Your files and values are not sent to us. Report a problem
Advertisement

About the Tailwind Color Generator

This tool builds a Tailwind-style color scale (50 to 950) from one seed color using the OKLCH color space. You pick a seed, the tool converts it to OKLCH, then creates 11 shades that keep the same hue and place your exact color at its closest step. It shows swatches you can copy and gives ready-to-paste code for Tailwind v4 @theme (OKLCH or HEX) and Tailwind v3 config. Designers and front-end developers use it to generate consistent theme tokens and to test contrast quickly. The tool runs entirely in your browser, so nothing is uploaded to a server. The method follows common OKLCH interpolation practices used by modern generators and aligns with Tailwind v4 workflows and OKLab advice from Bjorn Ottosson and Tailwind documentation.

How to use it

  1. 1Pick a seed color by hex or color picker.
  2. 2Adjust name or optional settings and preview the 11 swatches.
  3. 3Copy swatches as OKLCH or HEX and choose export format.
  4. 4Paste the Tailwind v4 @theme block or the v3 config into your project.
Advertisement

Worked example

Input: #ff6b6b. Exact result: an 11-step scale with steps 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950; your seed is placed at its closest step and the hue remains constant. Exports: Tailwind v4 @theme tokens (OKLCH or HEX) and a Tailwind v3 theme.extend colors object.

How it works

Makes a Tailwind CSS colour scale (50 to 950) from one colour in the OKLCH colour space, keeping your exact colour at its closest step and the same hue across the scale, with swatches to copy and code for Tailwind v4 @theme (OKLCH or HEX) or a Tailwind v3 configWorks in the browser with nothing to install

Source: Tailwind CSS - Customizing ColorsOKLab and OKLCH explanation by Bjorn Ottosson. Last checked 7 November 2026.

What it is good for

  • Produces a full 11-step scale (50 to 950) you can paste into Tailwind.
  • Keeps your seed at its nearest step and preserves hue across shades.
  • Runs in the browser with no uploads and direct exports for v4 or v3.
  • Does not guarantee WCAG contrast compliance; you must test real text and UI pairs.
  • It follows OKLCH interpolation and may not match Tailwind's hand-tuned default palettes exactly.
Advertisement

Questions people ask

Why use OKLCH instead of HSL or LAB?

OKLCH is more perceptually uniform, so lightness changes look more even to the eye. Many modern Tailwind generators use OKLCH for more natural tints and shades.

Will the tool ensure WCAG contrast for text?

No. The generator shows swatches and contrast hints, but you must check actual foreground and background pairs against WCAG. For legal or public projects, test with official guidelines like WCAG AA.

How do I add the result to Tailwind v4 versus v3?

For v4, paste the @theme block with OKLCH or HEX tokens into your CSS. For v3, paste the exported JS object into theme.extend.colors in tailwind.config.js.

Does the tool send my color to a server?

No. It runs fully in your browser. Nothing is uploaded or stored on a remote server by the tool itself.

Will my exact hex always appear in the scale?

The tool keeps your exact color at its closest step. If the seed is already very close to one step, that same hex will appear for that step; otherwise the tool preserves hue and places the seed at the nearest step.

Can I export OKLCH tokens instead of hex?

Yes. The tool offers Tailwind v4 @theme output in OKLCH or HEX, plus a v3 config export.

Help keep every tool free

FreeToolr stays free because people help it grow. Share a tool you like, tell us what to build next, or support us on Ko-fi.

Advertisement
Advertisement