1. Home
  2. Design tools
  3. Tailwind Color Shade Generator

Tailwind Color Shade Generator

Enter your brand color and get eleven matching shades that keep the same hue, ready to paste into Tailwind or plain CSS.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use Tailwind Color Shade Generator

  1. Enter the base color and a name.
  2. Check the shades and their contrast.
  3. Copy the Tailwind v4, v3 or CSS output.

Features

  • Eleven steps from 50 to 950
  • Your exact color kept at the closest step
  • Even lightness steps worked out in OKLCH
  • Contrast ratio of black or white text on each shade
  • Tailwind v4 @theme, v3 config and CSS variables
  • Every shade inside the sRGB range

Supported formats

Input

  • Hex, rgb(), hsl() and oklch() colors, one per line

You get

  • Tailwind v4 theme
  • Tailwind v3 config
  • CSS variables

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Tailwind Color Shade Generator is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • The scale is generated, not hand-tuned like Tailwind’s own palettes; adjust steps by eye.
  • Very saturated or very light inputs lose chroma at the ends of the scale.

Guide

Building a 50 to 950 colour scale for Tailwind from one brand colour

Tailwind’s colours come in scales: a name followed by a number from 50 for the faintest tint to 950 for the deepest shade. When a client gives you one brand colour, you need the whole scale so that backgrounds, borders, hover states and text all share a hue. Building eleven matching values by hand means eyeballing each one. This generator derives them from your starting colour, keeps that colour exactly where it belongs and writes the code to paste into your project.

How the scale is built

The base colour is converted to OKLCH, a colour space in which lightness, chroma and hue can be moved separately without surprising shifts in the perceived hue. Lightness steps from a very light value at 50 to a very dark one at 950. Hue stays fixed, and chroma, the intensity of the colour, is reduced towards both ends so that the lightest and darkest steps look calm instead of neon. Each value is checked against the sRGB gamut, which is what ordinary screens display, and pulled back inside it if necessary.

A worked example

Press Sample for #3b82f6, named brand, in the Tailwind v4 format. Its lightness is closest to step 500, so the 500 swatch is your exact colour, marked “your colour”. The generated scale reads 50 #f0f5fe, 100 #dbe9fe, 200 #c3d9fd, 300 #99bffc, 400 #67a1ff, 500 #3b82f6, 600 #2c6ace, 700 #2056ae, 800 #164693, 900 #0d397e and 950 #02255c. In v4 format the output is an @theme block with lines such as --color-brand-500: #3b82f6;, which makes classes like bg-brand-500 and text-brand-700 available. Choose CSS variables and the same values appear as --brand-500 inside :root.

Reading the contrast numbers

Each swatch carries a ratio such as 5.71:1. It is the WCAG contrast ratio between the shade and the label colour the page picked for it, black or white. For the sample, step 500 shows 5.71 and step 600 shows 5.17, and both are well above the 4.5 to 1 that WCAG 2 asks of normal text. Use these numbers to decide which steps can host text: pale steps need dark text, deep steps need white, and the mid steps are the ones to test carefully against your actual text colour with the contrast checker.

Choosing the base colour

Enter a six-digit hex, or rgb(), hsl() or oklch(). A highly saturated colour yields a vivid middle and soft extremes. A very dark base lands near step 900 or 950 and leaves the light steps with much of the range; a very light base lands near 100 or 200. Neutral colours with almost no chroma produce a grey scale tinted only slightly toward the original hue. The name field becomes part of every variable, so use a name that describes the role, such as brand, accent or primary.

Edge cases

Two colours that look alike on screen can have very different lightness, so compare the swatches before trusting a name. Print and colour-managed displays may show the scale slightly differently from sRGB. If the brand guide fixes specific values for a few steps, replace them in the output; the other steps will still be consistent in hue. The scale is monotonic in lightness, so hover states can safely be one step darker.

Limits

The scale resembles Tailwind’s built-in palettes in structure but is not the same algorithm, so a built-in blue-600 will not equal the generated 600. The generator does not check that your design passes accessibility as a whole and does not produce dark-mode variants. Everything is calculated in your browser.

Checked against the current version of the Tailwind Color Shade Generator on .

Frequently asked questions

Why is my brand colour at step 400 and not 500?

The tool places your exact value at the step whose lightness is closest to it. A light, bright colour such as a sky blue is lighter than a typical 500, so it lands on 400 and the darker steps are spread beneath it.

Can I use the result with an older Tailwind version?

Yes. Choose the v3 output to get a colour object for the config file, or use the CSS variable output with any framework and reference the variables yourself.

Why is my color not at step 500?

The page places your color at the step whose lightness is closest to it, so a dark brand color lands at 700 or 800 and a pale one at 200 or 300. The other steps are built around it.

Will these match Tailwind’s own palette?

No. They follow the same idea, a light-to-dark ramp in one hue, but Tailwind’s built-in colors were tuned by hand. Use this for your own brand color, then adjust steps by eye.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.