Skip to content
TabBench

Color Palette Generator

Generate 11-step Tailwind color shade scales (50 to 950) with WCAG contrast badges and color harmonies.

Runs in your browser. Nothing you add is uploaded.

What the Color Palette Generator does

Pick a base colour and this generator builds an 11-step shade scale named the way Tailwind names its colours (50 to 950), shows each shade's contrast ratio against white and black text, suggests complementary, analogous and triadic colours, and exports the scale as a tailwind.config.js block or as CSS custom properties. The scale is built in HSL: every step keeps your colour's hue and saturation and uses a fixed lightness, from 96% for 50 down to 6% for 950.

How to generate a colour scale

  1. Pick a base colour with the picker, type a hex code, choose a preset (Emerald, Indigo, Rose, Amber, Cyan, Violet), or press Random.
  2. Look along the 50–950 scale; each swatch shows its contrast against white and black and which text colour to use on it.
  3. Click any swatch to copy its hex code.
  4. Check the harmony row for accent colours: complementary (opposite hue), analogous (±30°) and triadic (±120°).
  5. Copy the tailwind.config.js snippet for Tailwind v3, or the CSS variables, which go inside @theme { } in Tailwind v4.

The Color Palette Generator runs entirely in your browser — nothing you enter is uploaded, stored, or logged.

When to use it

From a brand colour to a full UI scale

One brand hex is not enough for an interface: you need near-white tints for backgrounds, mid shades for borders and buttons, and dark shades for text. Generating eleven steps from one colour gives a family that belongs together, and the names slot straight into classes such as bg-brand-50 and text-brand-800.

Choosing accessible pairs

Each swatch shows its contrast against white and black. WCAG AA needs 4.5:1 for normal text and 3:1 for large text, so the ratios tell you at a glance which shades can carry white button text and which need dark text.

Finding accent colours

Complementary colours sit opposite each other on the colour wheel and contrast strongly; analogous ones sit beside each other and feel calm; triadic ones are spaced a third of the wheel apart. They are mathematical starting points, so adjust lightness and saturation by eye before using one.

Good to know

  • Because every step uses a fixed lightness, your exact input colour may not appear in the scale. Shade 500 is your hue and saturation at 50% lightness; if your brand colour must appear exactly, use it alongside the scale.
  • HSL lightness is not how bright a colour looks: a yellow and a blue at the same HSL lightness differ a lot in perceived brightness. Expect yellows to look washed out at the light end and blues to turn dark sooner; Tailwind's own palettes are hand-tuned for this.
  • Contrast ratios use the WCAG 2 formula, which runs from 1:1 (no contrast) to 21:1 (black on white).
  • The CSS variables are named --color-brand-50 to --color-brand-950, the naming Tailwind v4 uses for theme colours.

Frequently asked questions

What is the standard WCAG contrast ratio for text?

WCAG 2.1 Level AA requires a contrast ratio of at least 4.5:1 for normal body text and 3:1 for large text (18pt or 14pt bold). Level AAA requires 7:1 for normal text.

How do I add these shades to Tailwind CSS?

Copy the generated Tailwind Config snippet into your tailwind.config.js under theme.extend.colors to access classes like bg-brand-500, text-brand-700, etc.

How are shades 50 through 950 calculated?

Your colour is converted to HSL; the hue and saturation are kept, and the lightness is set to 96, 90, 80, 70, 60, 50, 40, 30, 20, 12 and 6% for the eleven steps. It is simple and predictable, but it does not reproduce Tailwind's hand-tuned palettes.

What does a 4.5:1 contrast ratio mean?

It is the minimum WCAG 2 Level AA asks for between normal-size text and its background, so that people with moderately low vision can read it. Large text (24px, or about 18.7px bold) needs 3:1, and Level AAA raises the bars to 7:1 and 4.5:1.

Page last updated . Found a wrong result or a mistake on this page? Let us know.