Skip to content

Tailwind Palette Generator

Generate a Tailwind CSS color scale from 50 to 950 from one base color. The tool finds the Tailwind palette closest in hue, places your color at the step with the most similar lightness and builds the other steps in OKLCH from that palette's lightness and chroma curve. You get hex and OKLCH values, an @theme block for Tailwind v4 and a config object for v3.

Reset

Frequently asked questions

Is my color kept exactly?

Yes. Your color is used unchanged at the step whose lightness is closest to it, for example 500 for a medium blue or 300 for a light one. The summary names that step.

How are the other steps calculated?

The tool takes the lightness and chroma of each step from the built-in Tailwind palette with the nearest hue, such as blue or red, shifts the lightness so the curve passes through your color, and scales the chroma relative to your color's step. The hue stays the same throughout.

What happens to gray or very muted colors?

Colors with almost no chroma are matched against Tailwind's neutral palettes, such as slate, zinc and stone, so the result stays a gray scale with the same slight tint.

Why do some steps lose saturation?

Very saturated light or dark tones fall outside the sRGB range screens can always show. Those steps are mapped into sRGB by reducing their chroma, which keeps the lightness and hue.

How do I add the palette to Tailwind v4?

Paste the @theme block into your main CSS file after @import "tailwindcss". Every step becomes a utility such as bg-brand-500 or text-brand-700.

And to Tailwind v3?

Add the object under theme.extend.colors in tailwind.config.js. The keys are the step numbers and the values are hex colors.

About OneClick Pro

OneClick Pro is a free collection of more than 150 web tools for everyday work: converting images and units, formatting and validating code, checking domains and SEO, and working with text, dates and numbers. Every tool runs without registration or subscription, and what you enter is only used to calculate your result and is never stored. Use it as a quick toolbox for one-off tasks, or bookmark the tools you rely on every day.