Skip to content
Tools

Tailwind color palette generator

Enter one color and get a full Tailwind palette from 50 to 950. The steps follow the lightness, chroma and hue shifts of Tailwind CSS 4's own colors, so your brand scale sits naturally next to blue-500 and slate-700. Copy it as a v4 @theme block or a v3 config.

Hex, rgb(), hsl() or oklch(). Nothing leaves your browser.

Your palette

  1. Yours

Your color sits on brand-600. The steps around it follow the shape of Tailwind's blue (71%) and indigo (29%) scales. Click a step to copy its name, or a value to copy the code.

brand-50 / 200 / 700

A soft panel with a brand-200 border and brand-900 text.

Buttons
Primary Secondary
Badge
On brand-950

Dark surfaces use the 900 and 950 steps, with 300 or 400 for accents.

@import "tailwindcss";

@theme {
  --color-brand-50: oklch(96.8% 0.012 259.79);
  --color-brand-100: oklch(93.2% 0.025 260.622);
  --color-brand-200: oklch(88% 0.046 259.958);
  --color-brand-300: oklch(80.5% 0.082 258.519);
  --color-brand-400: oklch(70.2% 0.13 261.157);
  --color-brand-500: oklch(61.8% 0.168 264.881);
  --color-brand-600: oklch(54.4% 0.191 267.005);
  --color-brand-700: oklch(48.5% 0.185 268.079);
  --color-brand-800: oklch(42.1% 0.151 269.072);
  --color-brand-900: oklch(37.6% 0.111 269.38);
  --color-brand-950: oklch(27.5% 0.069 271.845);
}

How the palette is built

Most palette generators spread lightness evenly between white and black and keep the hue fixed. Tailwind's palette does neither. Its yellows are much lighter at 500 than its blues, chroma peaks in the middle and fades at both ends, and many hues drift as they darken: amber moves toward orange, and blue toward indigo. A scale built with even steps looks off next to the real Tailwind colors.

This generator copies those patterns instead of inventing them.

  1. Read your color in OKLCH: lightness, chroma (how vivid) and hue.
  2. Find the nearest Tailwind families. It compares your hue with each v4 family at the step closest in lightness and picks the nearest one, or blends the two nearest by distance. Greys and muted colors use the neutral families.
  3. Place your color. It goes on the step whose lightness is closest, exactly as you entered it.
  4. Fill the other steps. Each step takes the lightness of the reference scale, shifted toward your color and fading back to Tailwind's own values at 50 and 950. Chroma follows the same rise and fall as the reference, scaled to your color, and the hue drifts the way the reference does.

Feed it a Tailwind color and you get that family back: blue-500 rebuilds the blue scale within a ΔE of 4 on every step, which is close to invisible. That is the test this tool runs on every release.

Using the palette in Tailwind CSS 4

@import "tailwindcss";

@theme {
  --color-brand-50: oklch(96.8% 0.012 259.79);
  /* … */
  --color-brand-950: oklch(27.5% 0.069 271.845);
}

Every --color-* variable becomes a set of utilities: bg-brand-600, text-brand-700, border-brand-200, ring-brand-500/50, and so on. The values are also plain CSS variables, so var(--color-brand-600) works in your own CSS. To find which existing Tailwind class is closest to a color, useHex to Tailwind; to see every default color with its OKLCH and hex code, see the Tailwind colors page.

Using it in Tailwind CSS 3

Choose v3 config and paste the object into theme.extend.colors. Tailwind 3 works with hex values, so this export uses the sRGB hex code of each step.

Which steps to use where

StepsTypical use
50–100Page tints, hover rows, soft badge and alert backgrounds
200–300Borders, dividers, focus rings, disabled states
400–500Icons, chart lines, accents on dark backgrounds
600–700Buttons, links and active states on white; 600 usually passes 4.5:1 with white text
800–950Text on tinted backgrounds, dark mode surfaces

Building a whole admin interface? The dashboard color palette generator turns one brand color into surfaces, text colors, status and chart colors, all checked for contrast.

Questions

How do I make a custom color palette in Tailwind CSS?

Enter your brand color above, give the palette a name and copy the export. In Tailwind CSS 4 you paste the @theme block into your main CSS file after @import "tailwindcss"; every step becomes a utility, so --color-brand-600 gives you bg-brand-600, text-brand-600, border-brand-600 and the rest. In Tailwind 3 you paste the colors object into theme.extend.colors in tailwind.config.js.

How does the generator decide the other shades?

It copies the shape of Tailwind's own palette. For your color it finds the one or two v4 families nearest in hue (a teal input borrows from teal and cyan) and reads how lightness, chroma and hue change from 50 to 950 in those families. Your color goes on the step closest to its own lightness, unchanged, and the rest of the scale is shifted to meet it.

Why is my color not on 500?

Tailwind does not put every hue at the same step. Its yellow-400 and blue-600 have about the same visual weight as other families at 500, because yellow is light by nature and blue is dark. Your color lands where its lightness fits the scale, so a pale color ends up at 200 or 300 and a deep one at 700 or 800. That keeps bg-brand-100 a light tint and bg-brand-900 a dark shade, as people expect.

OKLCH or hex: which export should I use?

Tailwind 4 defines its palette in OKLCH, so the OKLCH export matches it and keeps lighter and darker steps perceptually even. Some of the steps can be more saturated than sRGB screens can show; browsers then show the nearest color, which is the hex value listed on each swatch. Use the hex export when other tools (Figma, a design token file, email templates) need plain hex codes.

Can I generate a gray or neutral palette?

Yes. Enter a grey with a hint of color, such as #64748b. Low-chroma inputs follow the shape of the nearest Tailwind neutral (slate, gray, zinc, stone and the others), which run darker at 950 than the colorful families.

Is it free?

Yes. No sign-up, and nothing leaves your browser. Use the palettes in any project, commercial included.

UI Pro

The same palette, already designed into finished blocks

Every block, page template and website theme from €199, paid once, with every update and everything we add later. Not ready? The free blocks are open to everyone.

blocks
860
page templates
14
website themes
26
The About page template from UI Pro, built from its blocks.

This card is a UI Pro block: Rooilijn (call-to-action-07).