Color tools

Tailwind CSS Color Palette Generator

Turn one brand color into an 11-shade Tailwind scale that matches the look of Tailwind v4's built-in palette, ready to paste as @theme or config.

  • Free foreverNo trial, no paywall, no usage limits.
  • No sign-upOpen the page and start. We never ask for an email to use a tool.
  • PrivateEverything runs in your browser. Your input is never uploaded or stored on our servers.
  • Works offlineOnce the page has loaded, the tool keeps working without a connection.
Your brand color. It is placed at its natural shade and never altered; every other shade is built around it.
Random example color
Becomes the utility name: brand gives bg-brand-500, text-brand-700 and so on. Lowercase letters, numbers and hyphens.
Auto puts the base where its lightness naturally falls on Tailwind's curve. Pick a shade to force it, for example to make your logo color the 600.
Every shade fits sRGB, so OKLCH and HEX exports are exactly the same colors. The safe default.Like Tailwind v4's own palette: OKLCH values may use the wider P3 gamut for more vivid color on modern screens. HEX stays an sRGB fallback.
Follow the subtle hue shifts in Tailwind's palettes, such as yellows warming toward amber as they darken. Turn off for a constant hue.
Colorfulness of the other shades relative to Tailwind's curve. Lower for a muted, sophisticated scale; higher for punchier tints and shades.
100%
Rotate the hue across the scale: darker shades turn by the amount shown, lighter ones the other way. Small shifts (±10°) make scales feel richer.
0°

brand · 11 shades

Click any shade to copy its HEX. Badges show the better of white or black text on that shade and its WCAG contrast ratio.
Copy a share link to this scale

Curve blended from Tailwind violet and purple. Base locked at 600 (its natural position).

Export

An @theme block of OKLCH custom properties. Paste into your main CSS file; bg-brand-500 and friends work instantly.
CopyDownload theme.css
An @theme block of OKLCH custom properties. Paste into your main CSS file; bg-brand-500 and friends work instantly.A tailwind.config.js colors object with HEX values, plus DEFAULT set to your base color.Plain :root custom properties for any stack.Sass variables plus a map you can loop over.HEX values keyed by shade: handy for design tokens, Figma plugins and scripts.

Preview

Common components built from the scale, on light and dark surfaces, so you can judge the shades in context.

Light surface

Get startedLearn more

White on brand-600: 5.69:1 (passes AA)

NewBeta

Heads up

Alerts use 50 for the surface, 200 for the border and 700–800 for text.

A link in brand-600

Dark surface

Get startedLearn more
NewBeta

Heads up

In dark mode, flip the scale: 900–950 surfaces, 100–300 text.

A link in brand-400

Want a site designed with this level of care? Talk to our team

Quick answer

A Tailwind color palette is 11 shades of one hue, named 50 (lightest) through 950 (darkest), used as utilities such as bg-brand-500. Enter your brand color in Playxoft's free Tailwind Color Generator: it locks the color at its natural shade, builds the other ten along Tailwind v4's own OKLCH lightness and chroma curve, and exports a ready-to-paste @theme block for Tailwind v4 or a tailwind.config.js colors object for v3.

  • Tailwind v4 OKLCH curve
  • Base color locked
  • Chroma and hue shift
  • Display P3 option
  • Contrast badges
  • v4, v3, CSS and JSON export
  • Component preview

How to use the Tailwind Color Generator

  1. 1Enter your brand color in Base color (any CSS format) and give it a Color name, such as brand.
  2. 2Check where it landed: the locked swatch marks its natural shade. Use Base shade to force a different position.
  3. 3Optionally tune Chroma, Hue shift and Natural hue drift, and choose the sRGB or Display P3 gamut.
  4. 4Review the contrast badges on each swatch and the light and dark component previews.
  5. 5Pick an export format, then copy or download it into your project.

How are Tailwind v4 color palettes built?

Tailwind CSS v4 defines every default color in OKLCH, for example --color-blue-500: oklch(62.3% 0.214 259.815). Reading the values side by side shows the recipe:

ShadeBlue LBlue CYellow LYellow CTypical use
5097.0%0.01498.7%0.026Tinted page and card backgrounds
100–20093.2–88.2%0.032–0.05997.3–94.5%0.071–0.129Hover fills, badges, selected rows
300–40080.9–70.7%0.105–0.16590.5–85.2%0.182–0.199Borders, icons, dark-mode text
50062.3%0.21479.5%0.184The signature color
600–70054.6–48.8%0.245–0.24368.1–55.4%0.162–0.135Buttons, links, text on white
800–90042.4–37.9%0.199–0.14647.6–42.1%0.114–0.095Headings, dark surfaces
95028.2%0.09128.6%0.066Deepest backgrounds

Three patterns stand out. Lightness falls from about 97% at 50 to between 26% and 30% at 950, but each hue sits at its own height: yellow's 500 is far lighter than blue's, because a dark yellow stops looking yellow. Chroma peaks mid-scale, between 400 and 600 depending on hue (400 for amber, yellow, lime, emerald, teal and cyan; 500 for green, sky and fuchsia; 600 for reds, blues and purples), and tapers at both ends, so pale tints and deep shades stay calm. Hue drifts slightly: blue moves from 254.6° to 267.9°, and yellow warms from 102° to 54° so its dark shades read as golden brown instead of olive. The neutral palettes (slate, gray, zinc, neutral and stone, plus mauve, olive, mist and taupe added in v4.2) run darker still, down to about 13–15% at 950.

How does this generator match Tailwind's curve?

Instead of a generic lightness ramp, the generator learns the curve from Tailwind's own 17 chromatic palettes:

  1. It finds the two Tailwind palettes whose hue, at your color's lightness, is nearest on either side, and blends their lightness, chroma and hue-drift curves. A teal gets a teal-shaped curve; an orange-red gets something between red and orange.
  2. Low-chroma colors such as slate blues and warm grays blend toward Tailwind's neutral curve, which runs darker at 950.
  3. Your color is placed at the shade whose lightness it matches (its natural position) and locked there unchanged. The curve is remapped around it so neighbors keep Tailwind's spacing.
  4. Chroma is scaled by how saturated your color is compared with Tailwind's color at the same shade, so a muted brand color yields a muted scale.
  5. Out-of-gamut shades are brought into sRGB (or Display P3) by reducing chroma only, keeping lightness and hue.

Feed it a Tailwind color and you get that palette back closely: #7c3aed (v3 violet-600) lands at 600 and produces #f5f3fe at 50, #8b5cf6 at 500 and #6d2bd7 at 700, against Tailwind's #f5f3ff, #8b5cf6 and #6d28d9.

How do I add custom colors in Tailwind CSS v4?

Tailwind v4 is configured in CSS. Any variable in the --color-* namespace inside @theme becomes a full set of utilities:

@import "tailwindcss";

@theme {
  --color-brand-50: oklch(97.7% 0.014 308.3);
  --color-brand-500: oklch(62.7% 0.265 303.9);
  --color-brand-950: oklch(29.1% 0.149 302.7);
  /* …all 11 shades from the export panel */
}
<button class="bg-brand-600 text-white hover:bg-brand-700 focus-visible:ring-4 focus-visible:ring-brand-200">
  Get started
</button>

You now have bg-brand-*, text-brand-*, border-brand-*, ring-brand-*, fill-brand-* and the rest, plus CSS variables such as var(--color-brand-500) for use outside utilities. To remove Tailwind's default palette entirely, add --color-*: initial; at the top of the @theme block.

On Tailwind v3, use the Tailwind v3 export instead: it adds the scale under theme.extend.colors in tailwind.config.js, with DEFAULT set to your base color so plain bg-brand works too.

Which shades should I use for text, buttons and backgrounds?

Contrast decides more than taste. In Tailwind v4's default palette (rendered in sRGB), white text first reaches the 4.5:1 AA ratio at 600 for red, blue, violet, purple, fuchsia, pink and rose, at 500 for indigo, and not until 700 for orange, amber, yellow, lime, green, emerald, teal, cyan and sky. The badges on each swatch show this for your scale.

  • Primary buttons: 600 fill with white text, 700 on hover. Switch to 700/800 if the 600 badge is below AA.
  • Links and colored text on white: 600 or 700.
  • Tinted surfaces: 50 or 100 background, 200 border, 800 text.
  • Dark mode: flip the scale: 900–950 surfaces, 300–400 accents, 100–200 text.
  • Focus rings: 500 at full strength, or 200–300 as a soft halo, checked at 3:1 against the surface.

Check final pairs in the color contrast checker, and see the scale through color-blind eyes in the color blindness simulator.

sRGB or Display P3: which gamut should I export?

sRGB (the default) keeps every shade inside the gamut every screen can show, so the OKLCH and HEX exports are exactly the same colors. Choose it when colors must match across Figma, email, PDFs and older browsers.

Display P3 follows what Tailwind v4 itself does: OKLCH values may use the wider P3 gamut, so mid shades look more vivid on modern phones and laptops, while sRGB screens display the nearest color they can. HEX exports always stay sRGB, so the v3 config and JSON remain safe fallbacks.

Frequently asked questions

Eleven: 50, then 100 through 900 in steps of 100, then 950. The 950 shade was added in Tailwind v3.3, and v4 keeps the same naming, so palettes from this generator drop straight into either version.
No. Your base color is locked unchanged at its natural shade, or at the shade you choose under Base shade. Only the other ten shades are generated around it.
Choose the Tailwind v3 export and paste the colors object under theme.extend.colors in tailwind.config.js. It uses HEX values, which v3 handles everywhere, and sets DEFAULT to your base color.
In sRGB mode, vivid shades are reduced to fit the sRGB gamut so the OKLCH and HEX values match exactly. Tailwind v4's defaults use the wider Display P3 gamut. Switch Gamut to Display P3 to export P3 values like Tailwind does.
Use a role name such as brand, primary or accent rather than a hue name, so you can change the hue later without renaming classes. Names become utilities like bg-brand-500, so use lowercase letters, numbers and hyphens.
Yes. Enter a gray or a lightly tinted gray such as #64748b. Low-chroma colors follow Tailwind's neutral curve, which runs darker at 950, and keep their subtle tint across every shade.

Last updated by the Playxoft engineering team.

From the designers who built this tool

Want your site to look this polished?

Consistent color, crisp typography and fast pages are what make a site feel premium. We build accessible, high-converting websites with design systems that stay consistent everywhere. Send us your site and we will share honest recommendations, free.