Tailwind Palette Generator
Generate an 11-step Tailwind color scale (50, 100, 200… 950) from any base color. Output is ready to paste under theme.extend.colors in tailwind.config.ts — with OKLCH-based perceptual lightness for visually even ramps.
- 11 stops: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950
- Perceptually even lightness via OKLCH interpolation
- Pastes straight into theme.extend.colors
- Optional CSS-variable form for shadcn/ui-style theming
Direct answer
50 (almost-white) to 950 (near-black) at the same hue. The trick to a usable scale is interpolating lightness in a perceptually uniform space (OKLCH) so stop 500 looks like the midpoint, not a random offset.Tailwind Palette Generator
#6366F1
Tailwind Config
// tailwind.config.ts
export default {
theme: {
extend: {
colors: {
brand: {
DEFAULT: "#6366F1",
50: "#F3F3FE",
100: "#E6E7FD",
200: "#CDCEFB",
300: "#B1B3F8",
400: "#8A8CF5",
500: "#6366F1",
600: "#5457CD",
700: "#40429D",
800: "#2D2E6C",
900: "#191A3C",
950: "#0C0C1D",
},
},
},
},
};When this saves you time
Real workflows where tailwind palette generator replaces tedious manual work or an in-app subscription tool.
Spin up a Tailwind theme around a brand color
Per-brand themes from one Tailwind config
Customize shadcn/ui base colors
Inverted scale for dark mode
Success / warning / error ramps
Marketing site neutrals tuned to brand temperature
How it works
The methodology — every transformation documented so the output is reproducible.
Identify the base color
We treat the input as approximately stop 500–600 (mid-saturation, mid-lightness). Tailwind’s default scales (blue-500, red-500…) sit around L=55% in OKLCH.
Map stops to lightness curve
Stops 50–950 follow a non-linear lightness ramp: 97, 94, 86, 75, 65, 55, 45, 35, 25, 18, 12. The curve is denser at the ends so the lightest and darkest stops separate properly.
Interpolate in OKLCH
Lightness scaled in OKLCH (perceptually uniform), hue preserved, chroma damped near the endpoints (saturation tapers as the color approaches white or black, mirroring how pigments behave).
Emit Tailwind config
Output is a TypeScript object ready to drop under theme.extend.colors. Optionally emits CSS variables for shadcn/ui-style theming.
Worked examples
| Input | Result | Notes |
|---|---|---|
| #3B82F6 · name: brand | brand-50 → brand-950 (blue scale, perceptually even) | Mirrors Tailwind’s built-in blue scale. Base maps to roughly brand-500. |
| #10B981 · name: success | success-50 #ECFDF5 … success-950 #022C22 | Emerald-style success ramp. Use for confirmations, success states. |
| #F59E0B · name: warning | warning-50 #FFFBEB … warning-950 #451A03 | Amber warning ramp. Pair with brand neutrals for non-destructive alerts. |
| #1A1614 · name: neutral | neutral-50 #FAFAF9 … neutral-950 #0C0A09 | Warm-leaning gray. Replaces Tailwind’s zinc/slate/stone defaults. |
Common mistakes to avoid
Interpolating in sRGB instead of OKLCH
Holding chroma constant across the scale
Treating the base as stop 500 exactly
Forgetting accessibility on extreme stops
Frequently Asked Questions
What a 'good' Tailwind scale looks like
The defining property of a usable color scale is perceptually even spacing: stop 500 looks like the midpoint between 50 and 950, and adjacent stops feel evenly separated. The pre-Tailwind state of the art (Material Design’s 50–900 scales) interpolated in HSL, which is geometric but not perceptual — yellow at L=50% looks visibly brighter than blue at L=50%. The result was scales that worked for blue but felt off for yellow and green.
Tailwind v3+ and shadcn/ui moved to OKLCH-based scale generation — same hue, lightness in a uniform space, chroma tapered at endpoints. That is what we do here.
Stops that matter most in practice
- 50, 100: backgrounds, subtle surfaces, hover tints. Almost-white at the lightest end.
- 200, 300: borders, dividers, disabled states. Bright enough to read structure, soft enough not to dominate.
- 400, 500: primary brand accents, large call-to-action elements.
500is the canonical brand color in most systems. - 600, 700: hover/pressed states of
500; primary text on tinted backgrounds. - 800, 900, 950: dark-mode surfaces, body text on light backgrounds, deepest brand voice.
950is the dark-mode equivalent of50.
From Tailwind scale to design tokens
A Tailwind color scale is one layer of a design-token system — specifically, the reference layer (palette of values). The other layer is semantic tokens (role-named: primary, surface, text-muted). For a full token pipeline, export the scale to the design token generator and add semantic mappings that reference the scale stops.
Validating the scale for accessibility
Before shipping a scale, run the most-used text/background pairs through the contrast checker. The common gotchas:
- Body text uses
700or800on a50background — almost always passes AA, often passes AAA. - Muted text on
50backgrounds: use500or darker.400often fails AA at 14pt. - Button text on
500background: white passes for most brand colors; check yellow / lime / cyan ramps where white may fail.