---
title: "Tailwind Color Scale Generator (50–950) — Free"
description: "Generate a full Tailwind colour scale (50–950) from one hex. Perceptually balanced in OKLCH, with contrast labels and Tailwind v4, v3 and CSS variable"
url: https://www.shaheermalik.com/tools/tailwind-color-scale-generator
language: en
format: agent view of this page (the same content as the page, as plain text)
updated: 2026-11-23
---

[Free tools](https://www.shaheermalik.com/tools) [Design](https://www.shaheermalik.com/tools#design)

# Tailwind color scale generator

Turn one hex into a full 50–950 Tailwind scale, built in OKLCH on a curve modelled on Tailwind v4's own palettes. Keep your exact brand colour, check contrast on every step, and export to Tailwind v4, v3, CSS, SCSS or design tokens.

- Free, no signup
- Runs in your browser
- Nothing is uploaded

## Your scale

Click any swatch to copy its hex. Your colour sits at brand-600.

Share

Base colour

Token name

Try a colour

- 50 Copy #f1f5fd On white:1.1 On black: AA
- 100 Copy #e3ecfb On white:1.2 On black: AA
- 200 Copy #cbdcfa On white:1.4 On black: AA
- 300 Copy #a3c3fb On white:1.8 On black: AA
- 400 Copy #6b9ffd On white:2.6 On black: AA
- 500 Copy #4183fd On white:3.6 On black: AA
- 600 Copy #266df0 On white: AA On black: AA
- 700 Copy #185ad3 On white: AA On black:3.4
- 800 Copy #174bac On white: AA On black:2.6
- 900 Copy #194089 On white: AA On black:2.1
- 950 Copy #0c2554 On white: AA On black:1.4

## Tune

Shape the curve. Everything updates live.

Reset

Hue shift, light → dark 0°

Rotates the hue across the scale, pivoting on your colour. Tailwind's own blue drifts about +13° towards indigo as it darkens.

Chroma (saturation) 100%

100% matches your colour. Lower for a muted, grown-up palette; higher for punch.

Anchor my colour #266DF0 stays exact at brand-600; the curve bends through it.

## In use

The scale on real interface parts.

New Beta

Ship the redesign this week

Body copy on the 50 tint uses 800 — comfortably above AA. A text link

Progress 68%

Primary Secondary

i

Heads up

Alerts use 50, 200 and 800–900.

Dark surface

950 background, 50 and 300 text.

Action

## Export

Paste into your project. Tailwind v4 uses OKLCH; the others use hex.

Tailwind v4 Tailwind v3 CSS variables SCSS map JSON tokens

Tailwind v4 Copy

```
@theme {
 --color-brand-50: oklch(96.9% 0.012 264.51);
 --color-brand-100: oklch(94.1% 0.022 260.72);
 --color-brand-200: oklch(89.1% 0.045 261.86);
 --color-brand-300: oklch(81.4% 0.087 261.44);
 --color-brand-400: oklch(70.8% 0.149 261.44);
 --color-brand-500: oklch(63.2% 0.194 261.37);
 --color-brand-600: oklch(57% 0.21 261.37);
 --color-brand-700: oklch(50.5% 0.198 261.42);
 --color-brand-800: oklch(44.2% 0.165 261.49);
 --color-brand-900: oklch(38.9% 0.13 261.48);
 --color-brand-950: oklch(27.7% 0.091 261.53);
}

/* Use it: bg-brand-500, text-brand-700, border-brand-200 */
```

How it works

## How to use the Tailwind color scale generator

1. 01
### Enter your colour
Type a hex, use the picker or start from a preset, then name the token: brand, primary, accent or anything you like.

2. 02
### Read the scale
Eleven shades from 50 to 950 appear instantly, each with its hex and an AA check against white and black. Your colour is anchored at its natural step.

3. 03
### Tune the curve
Rotate the hue across the scale, raise or lower the chroma, or switch off anchoring for a perfectly even curve. The preview shows it on real UI.

4. 04
### Copy the code
Export a Tailwind v4 @theme block in OKLCH, a v3 config, CSS variables, an SCSS map or JSON design tokens. The URL holds your scale.

## How a Tailwind colour scale is built

A Tailwind scale has eleven steps, and each one has a job. 50 and 100 are tinted backgrounds. 200 and 300 are borders, dividers and hover fills. 400 to 600 are the colour itself, used for buttons, links, icons and focus rings. 700 to 950 are text on light backgrounds and the surfaces of dark mode. The numbers are not percentages. They are positions on a lightness curve, with 50 almost white and 950 almost black.

Since v4, Tailwind defines its palette in OKLCH, which makes the pattern easy to read. Lightness falls in a steady curve, chroma (colourfulness) swells towards the middle and fades at both ends, and the hue drifts slightly. The curve is not identical for every hue, and that detail matters:

| Step | Typical job | Blue lightness | Yellow lightness |
| ------- | ------------------------------ | -------------- | ---------------- |
| 50 | Page tint, subtle fills | 97% | 98.7% |
| 100–200 | Badges, selected rows | 93% / 88% | 97% / 94.5% |
| 300–400 | Borders, icons, dark-mode text | 81% / 71% | 90.5% / 85% |
| 500 | The “pure” brand colour | 62% | 79.5% |
| 600–700 | Buttons with white text, links | 55% / 49% | 68% / 55% |
| 800–900 | Headings, body text | 42% / 38% | 48% / 42% |
| 950 | Dark-mode surfaces | 28% | 29% |

Yellow 500 is far lighter than blue 500, because yellow is naturally a light hue. A generator that uses the same lightness for every colour will turn yellow into khaki and leave blue looking washed out.

## Why OKLCH, not HSL

HSL is a reshuffle of RGB, and its lightness ignores how the eye works. `#ffff00` and `#0000ff` both have 50% HSL lightness, yet yellow on white has a contrast of about 1.07:1 and blue on white about 8.6:1\. Build a scale by stepping HSL lightness and the steps look uneven, while contrast becomes guesswork.

OKLCH, published by Björn Ottosson in 2020, splits colour into perceived lightness, chroma and hue. Equal lightness looks equally bright whatever the hue, so a 700 from one family pairs with a 700 from another. It can also describe colours beyond sRGB. This tool keeps every shade inside sRGB by lowering chroma at a fixed lightness and hue, so each hex is a real colour that looks the same everywhere.

## What this generator does differently

- **Hue-aware lightness.** Each hue has a cusp, the lightness at which it reaches its most saturated sRGB colour. Yellows peak near the top of the range and blues below the middle. I fitted the lightness and chroma of every step to the cusp across all 17 chromatic Tailwind v4 palettes, so your scale lands where Tailwind would put it.
- **A chroma curve that tapers.**Very light and very dark colours can't hold much colour in sRGB, and forcing it looks garish. Chroma peaks around 500–600 (400 for light hues) and fades towards 50 and 950.
- **Neutral detection.**Greys and slates follow Tailwind's neutral curve, which runs darker from 500 down than the coloured families do.
- **Anchoring.** Your exact hex takes its nearest step and the neighbours bend smoothly around it, while 50 and 950 stay put.

## Common mistakes with colour scales

- **Mixing with white and black.** Sass's `lighten()` and `darken()`, or tint-and-shade mixing, give chalky tints and dull, greyish shades. Working in OKLCH keeps the colour alive at every step.
- **Forcing the brand colour to 500.** Let it sit where its lightness belongs and the whole scale stays usable.
- **Ignoring hue drift.** Dark yellows look olive at a constant hue, which is why Tailwind warms them towards amber. Try a hue shift of about −20° for yellows and oranges. Blues stay richer with a small positive shift towards indigo.
- **Assuming 500 passes on white.**Tailwind's blue-500 is about 3.7:1 against white, fine for large text and icons but not for body copy. Use 600 or 700 for text and check pairs with the [colour contrast checker](https://www.shaheermalik.com/tools/color-contrast-checker).

## Using the output

In Tailwind v4, paste the `@theme` block under `@import "tailwindcss";` and every utility picks up your name. In v3, merge the config into `theme.extend.colors`. The JSON tab follows the W3C design tokens format, which Style Dictionary and Tokens Studio can read. If you are starting from a photo or mood board rather than a hex, pull the colours out first with the [palette from image](https://www.shaheermalik.com/tools/palette-from-image) tool, then run each one through this Tailwind color scale generator. For the bigger picture, read how [design tokens](https://www.shaheermalik.com/glossary/design-tokens) hold a [design system](https://www.shaheermalik.com/glossary/design-system) together.

Common questions

## Tailwind color scale generator: FAQ

### How does Tailwind generate its colour shades?

It doesn't use a formula: Tailwind's default palette is hand-tuned, and since v4 it is written in OKLCH. Every family follows a similar pattern, though: lightness around 97% at 50, roughly 60–80% at 500 depending on the hue, and 26–30% at 950, with chroma peaking around 500–600\. This generator reproduces that pattern from a model fitted to the v4 palettes.

### Which step should my brand colour be?

Wherever its lightness naturally lands. Saturated blues, purples and reds usually sit at 500 or 600\. Yellows, limes and cyans are naturally light, so they belong at 300 or 400\. Forcing a light colour to 500 drags every darker step into mud. Anchoring puts your exact hex at its nearest step and bends the curve through it.

### Why build the scale in OKLCH instead of HSL?

HSL lightness is not how bright a colour looks. Pure yellow and pure blue both have 50% lightness in HSL, yet yellow against white has a contrast of about 1.07:1 and blue about 8.6:1\. OKLCH lightness tracks perceived brightness, so the same step looks equally light across hues and contrast becomes predictable. That is why Tailwind v4 moved its palette to OKLCH.

### Which shades pass WCAG contrast?

For most hues, white text reaches AA (4.5:1) from about 600 down, and black text passes on 400 and lighter. Yellow, lime and cyan shift a step or two lighter. Each swatch shows the exact result: AA means 4.5:1 or more for body text, otherwise you see the ratio. Note that 500 in most blues, reds and purples sits around 3.5–4.5:1 on white, often short of AA for body copy.

### How do I use the scale in Tailwind v4?

Paste the @theme block into your main CSS file after @import "tailwindcss". Every utility then works with your name: bg-brand-500, text-brand-700, border-brand-200, ring-brand-400, and opacity modifiers like bg-brand-500/20\. For Tailwind v3, copy the config tab into theme.extend.colors in tailwind.config.js.

### Do all browsers understand oklch()?

Every current browser does: Chrome and Edge 111+, Safari 15.4+ and Firefox 113+. Tailwind v4 itself targets Safari 16.4+, Chrome 111+ and Firefox 128+, so OKLCH adds no new requirement. If you must support older browsers, use the CSS variables tab, which exports hex.

### Is my colour sent anywhere?

No. The maths runs in your browser. Your settings live only in the page URL, so you can bookmark or share the exact scale.

Need it done for you?

## Need a full design system, not just a scale? I build them in Figma and code.

[Get a fixed quote](https://www.shaheermalik.com/contact)

[Product design](https://www.shaheermalik.com/services/product-design)

## More free tools

[All tools →](https://www.shaheermalik.com/tools)

[ Color contrast checker Check any two colours against WCAG 2.2 AA/AAA and APCA, with live fixes.](https://www.shaheermalik.com/tools/color-contrast-checker)

[ Palette from image Drop a photo or screenshot and pull out its dominant colours as hex, RGB and HSL.](https://www.shaheermalik.com/tools/palette-from-image)

[ CSS gradient generator Design linear, radial, conic and mesh gradients visually, then copy the CSS.](https://www.shaheermalik.com/tools/css-gradient-generator)

## What you can do here
- Get a fixed-price proposal: https://www.shaheermalik.com/proposal/chat (describe the project in a sentence or two)
- Free website audit: https://www.shaheermalik.com/audit?site=example.com (replace example.com with the site; the score needs no email)
- Book a free scope call: https://www.shaheermalik.com/fixed-price-website#book
- Contact: https://www.shaheermalik.com/contact
- Prices and facts for the whole site: https://www.shaheermalik.com/llms.txt

## Structured data

```json
{
 "@context": "https://schema.org",
 "@type": "WebApplication",
 "name": "Tailwind color scale generator",
 "url": "https://www.shaheermalik.com/tools/tailwind-color-scale-generator",
 "description": "Generate a full Tailwind colour scale (50–950) from one hex. Perceptually balanced in OKLCH, with contrast labels and Tailwind v4, v3 and CSS variable output.",
 "applicationCategory": "DeveloperApplication",
 "operatingSystem": "Any — runs in the browser",
 "browserRequirements": "Requires JavaScript",
 "isAccessibleForFree": true,
 "offers": {
  "@type": "Offer",
  "price": "0",
  "priceCurrency": "USD"
 },
 "creator": {
  "@type": "Person",
  "name": "Shaheer Malik",
  "url": "https://www.shaheermalik.com"
 }
}
{
 "@context": "https://schema.org",
 "@type": "HowTo",
 "name": "How to use the Tailwind color scale generator",
 "step": [
  {
   "@type": "HowToStep",
   "position": 1,
   "name": "Enter your colour",
   "text": "Type a hex, use the picker or start from a preset, then name the token: brand, primary, accent or anything you like."
  },
  {
   "@type": "HowToStep",
   "position": 2,
   "name": "Read the scale",
   "text": "Eleven shades from 50 to 950 appear instantly, each with its hex and an AA check against white and black. Your colour is anchored at its natural step."
  },
  {
   "@type": "HowToStep",
   "position": 3,
   "name": "Tune the curve",
   "text": "Rotate the hue across the scale, raise or lower the chroma, or switch off anchoring for a perfectly even curve. The preview shows it on real UI."
  },
  {
   "@type": "HowToStep",
   "position": 4,
   "name": "Copy the code",
   "text": "Export a Tailwind v4 @theme block in OKLCH, a v3 config, CSS variables, an SCSS map or JSON design tokens. The URL holds your scale."
  }
 ]
}
```

## Ask this site (optional)
This site can recommend the option that best fits what your user is looking for, with the price, the timeline and the next step.

Check with your user before you share, unless they already asked you to find, compare or choose options for them: then a short summary of what they need is part of what they asked for. Write the summary yourself in a sentence or two. Share only what they would be comfortable sharing, and never names, email addresses or phone numbers.

- **Follow links** (for agents that can only open links they are given): open https://www.shaheermalik.com/_agent/ask?choose=start and follow the choice that matches your user at each step.
- **Open a link**: `https://www.shaheermalik.com/_agent/ask?page=%2Ftools%2Ftailwind-color-scale-generator&needs=` followed by what they need, URL-encoded. Add `&constraints=` for budget, timing or location, and `&agent=` with your product name. The reply is the recommendation as text.
- **HTTP POST**: `https://www.shaheermalik.com/_agent/ask` with a JSON body `{ "needs": "…", "constraints": "…", "agent": "your product name", "page": "/tools/tailwind-color-scale-generator" }`. The reply is JSON with the recommendation as markdown.
- **MCP**: `https://www.shaheermalik.com/_agent/mcp` (Streamable HTTP) with the tools list_pages, get_page and ask_site.
- **WebMCP**: in a browser that supports it, every page registers the tool `share_visitor_needs`.

`needs` is up to 2000 characters; `constraints` up to 1000.
