Tools / Tailwind Shades Generator

Tailwind Shades Generator.

Turn one brand color into a Tailwind 50–950 palette, as v4 @theme, v3 config, CSS variables or SCSS.

Runs in your browser

Ctrl/⌘ + Enter to run · Ctrl/⌘ + Shift + C to copy the result

Result
Code
Palette
Shades
Base color

About Tailwind Shades Generator

The Tailwind Shades Generator builds a full 50 to 950 color scale from a single brand color, ready to paste into a Tailwind CSS project. Enter a hex, rgb(), hsl() or oklch() color, name it, and the tool returns eleven shades as a Tailwind v4 @theme block with --color-brand-500 style variables, a v3 tailwind.config.js colors object, plain CSS custom properties or SCSS variables. The scale is computed in the OKLCH color space, which matches how people perceive lightness, using lightness steps close to Tailwind's own default palette: 50 is almost white, 950 is nearly black, and chroma tapers off at both ends so the lightest and darkest shades do not look neon or muddy. Your exact color is kept unchanged and placed at the stop whose lightness it matches best, or at a stop you choose. For example, indigo #6366f1 lands on 500 and produces a scale similar to Tailwind's built-in indigo. The table lists each shade with its OKLCH value and contrast against white and black, so you can see at a glance that 600 or darker is safe for white text. Typical mistakes are anchoring a light pastel at 500, which squeezes the light end, and using a shade below 4.5:1 for body text. Colors outside the sRGB gamut are brought in by reducing chroma, and everything runs in your browser.

How to Use

  1. Pick the base color and give the palette a name.
  2. Choose where the base sits (auto works for most colors) and the output format.
  3. Copy the generated @theme, config or variables into your project.

Frequently Asked Questions

Does it work with Tailwind CSS v4?

Yes. The default output is a v4 @theme block with oklch() values. Switch the format to v3-config for tailwind.config.js.

Why is my color placed at 400 instead of 500?

In auto mode the base color goes to the stop with the closest lightness so the scale stays even. Choose 500 under "Place the base color at" to force it.

How are the other shades calculated?

Lightness follows Tailwind's default steps in OKLCH, re-scaled around your color; hue is kept and chroma is reduced towards 50 and 950.

Is anything uploaded?

No. The palette is generated in your browser.

Related Tools