Tailwind color palette generator logo

Tailwind Color Palette Generator & WCAG Contrast Checker

Generate accessible 11-step Tailwind CSS color scales with real-time WCAG contrast checking. Export ready-to-use tailwind.config.js code instantly.

72-color spectrum

72 popular colors: 12 per row · 6 rows, light to deep. Pick one, then fine-tune it with the selector.

Custom picker — drag to choose
#1168f5 H 217 · S 93 · V 96
Best on white
brand-950 · AA text
Best on #191919
brand-50 · AA text

brand — 11-step scale

Contrast vs white / #191919

Base color #3b82f6 anchors shade 500. Click any row to copy its hex.

Live component preview

New badge Dark badge

Card surface — shade 50

Body copy uses shade 600 (#0560f5) — contrast 4.93:1

Dark card — shade 900

Body copy uses shade 300 (#a3c2f5) — contrast 7.45:1

Built for speed and accessibility

  • ✓ 11 steps (50–950) generated instantly in pure HSL math — no server round-trip.
  • ✓ Every shade shows live WCAG 2.1 contrast ratios against white and dark backgrounds.
  • ✓ Export as tailwind.config.js, CSS custom properties, or JSON.
  • ✓ Light & dark mode UI with system theme detection.
  • ✓ Zero tracking, zero backend — everything runs in your browser.

Why Use a Free Tailwind Color Palette Generator?

A Tailwind color palette generator turns a single brand color into the full 11-step scale Tailwind CSS expects — 50, 100, 200, 300, 400, 500, 600, 700, 800, 900 and 950 — in one click. Instead of hand-tuning eleven hex values in a color picker, you pick one color and instantly get a consistent Tailwind CSS color scale you can paste straight into tailwind.config.js.

This free Tailwind palette generator goes further than a shade generator: every step is checked against WCAG 2.1 contrast ratios in real time, previewed inside real buttons, badges, cards and inputs, and exported as JavaScript config, CSS custom variables or JSON for design-system pipelines. No account, no upload, no server — the whole color calculation runs in your browser.

How to Generate Accessible Color Palettes for Tailwind CSS

A Tailwind color scale is an 11-step ramp where 500 is your primary brand color, 50–300 are tints used for hover states, badges and subtle surfaces, and 600–950 are shades used for text, borders and dark-mode backgrounds.

  1. Pick a base color — drag the custom saturation/brightness selector and hue slider, paste a hex code, or click any of the 72 colors in the rainbow spectrum palette.
  2. Read the contrast badges — each shade shows its live WCAG 2.1 ratio against white and against the #191919 dark background, so you know which steps are safe for body text.
  3. Copy the code — click any shade row to copy its hex, or open the export modal to copy the whole tailwind.config.js object, CSS variables or JSON in one click.

The generator anchors your picked color (#3b82f6) at step 500, converts it to HSL, then interpolates the remaining steps by shifting lightness while gently modulating saturation. Extreme tints (50 and 100) are desaturated so they render as clean off-whites instead of neon pastels, and deep shades (800–950) keep enough chroma to stay recognizably on-hue rather than collapsing to grey.

Understanding WCAG 2.1 Contrast Ratios in Dark Mode Design

WCAG 2.1 defines contrast as a ratio between 1:1 and 21:1, calculated from the relative luminance of the foreground and background colors. Every shade in the palette above shows its measured ratio against a light surface (#ffffff) and a dark surface (#191919), so you can see at a glance which steps are safe for body text.

  • AA (normal text): minimum 4.5:1 — the baseline for most production UI.
  • AAA (normal text): 7:1 or higher — the target for long-form reading and accessibility-critical flows.
  • Large text (≥18pt or 14pt bold): relaxes to 3:1 (AA) and 4.5:1 (AAA).

Dark mode is where teams most often break compliance: mid-tone shades that pass on white (frequently 400–600) drop below 4.5:1 against near-black backgrounds. The fix is simple — for dark surfaces use shades 100–300 for body text and reserve 500 for accents, icons and borders that only need the 3:1 non-text threshold. Use this tool as a dark mode contrast checker before you ship: if a badge says fail, pick the next step up or down.

Integrating Custom Color Scales into tailwind.config.js

Copy the generated object and drop it under theme.extend.colors. Tailwind automatically creates a utility for every step: bg-brand-500, text-brand-700, border-brand-200, plus hover, focus and dark variants of each.

For Tailwind v4 you can skip the JavaScript config entirely and define the scale as CSS custom properties in your stylesheet: @theme { --color-brand-500: #000; } using the CSS variables export from the modal above. Existing components keep working — only the token definition changes.

Frequently asked questions about the Tailwind color palette generator

How does the HSL shade calculation work?

Your hex color is converted from RGB to HSL. Lightness is then interpolated toward fixed targets for the tint steps (97.5% at 50 down to 68% at 400) and scaled downward from your source lightness for the shade steps (82% of source at 600 down to 22% at 950). Saturation is multiplied by a per-step factor that damps the lightest steps and boosts the deep ones, keeping the ramp perceptually consistent.

What is the difference between WCAG AA and AAA standards?

AA requires a 4.5:1 contrast ratio for normal text and 3:1 for large text. AAA raises the bars to 7:1 and 4.5:1 respectively. AA is the legal/compliance baseline used by most regulations (Section 508, EN 301 549); AAA is recommended for reading-heavy interfaces and for users with low vision.

How do I use these shades in Tailwind CSS v3 and v4?

In v3, paste the exported object into theme.extend.colors of your config file. In v4, add each token as --color-brand-500: #hex; inside an @theme block — or use the CSS variables export directly with var(--color-brand-500).

What is the best free Tailwind color palette generator?

The best tool generates all 11 Tailwind shades (50–950) from a single color, shows live WCAG 2.1 contrast ratios against light and dark backgrounds, previews the colors in real components and exports tailwind.config.js, CSS variables or JSON — all free, client-side and without sign-up. This generator does exactly that, which is why it needs no account and works offline after the first load.

Can I use it as a dark mode contrast checker?

Yes. Every shade is measured against #191919, a typical dark-mode app background, as well as pure white. The badge shows the exact ratio and whether it passes AA or AAA, so you can validate both light and dark themes before pushing your palette.

Is my color data sent anywhere?

No. All shade generation, contrast math and exports run entirely in your browser. There is no backend, no database and no color data collection — reload the page and the tool still works.