Palette Generator

Start with one color and get six kinds of matching palettes, built by rotating the hue around the color wheel, with a text-contrast check on every swatch.

Palette type

Complementary: the base plus the hue opposite it on the color wheel (180°).

Copy palette as

How to use

  1. Choose a base color with the swatch, or type a HEX code such as #e2553f.
  2. Pick a palette type: complementary, analogous, triadic, split-complementary, tetradic or monochromatic.
  3. Click any swatch to copy its HEX code. The line on each swatch tells you whether white text and dark text pass WCAG AA (4.5:1) on it.
  4. Export the whole palette with CSS (custom properties), JSON (an array of HEX codes) or Tailwind (a colors block for your config).
  5. Press Copy link to share the page with your base color and palette type already chosen, or bookmark it to come back to the same palette.

How it works

Each palette starts from your base color written in HSL: hue (an angle from 0° to 360° around the color wheel), saturation and lightness. The tool keeps saturation and lightness the same and rotates only the hue by fixed angles, then converts each result back to sRGB with the algorithm in CSS Color Module Level 4.

PaletteHue offsets from the baseWhat you get
Complementary0°, +180°the base plus the hue opposite it on the color wheel (180°)
Analogous-60°, -30°, 0°, +30°, +60°neighbors 30° and 60° either side of the base
Triadic0°, +120°, +240°three hues spaced evenly, 120° apart
Split-complementary0°, +150°, +210°the base plus the two hues either side of its complement (180° ± 30°)
Tetradic (square)0°, +90°, +180°, +270°four hues spaced 90° apart
Monochromaticnone (lightness 20, 35, 50, 65, 80%)the base hue at five lightness levels (tints and shades)

In the monochromatic palette, the step closest to your base color's lightness is replaced by the exact base color, so your color always appears unchanged.

The label on each swatch is dark or white, whichever has the higher WCAG contrast ratio against that swatch. The AA line under it runs the WCAG 2.2 contrast formula twice, once for white text and once for dark text (#22252a), and marks a check where the ratio is at least 4.5:1, the AA minimum for normal-size text. A swatch can pass for both, for one, or for neither; mid-tone colors often fail with both, which means they suit backgrounds for large headings, borders and icons better than body text.

Export formats

The three export buttons copy the same colors in the order shown. CSS gives a :root block of custom properties (--color-1, --color-2 …). JSON gives a plain array of lowercase HEX strings, handy for design tokens or scripts. Tailwind gives a colors object with the palette under brand, keyed 1, 2, 3 and so on.

Worked example

Base color #e2553f is hsl(8, 74%, 57%) in HSL: hue 8°.

Complementary: hue 8° + 180° = 188°, same saturation and lightness, which is #3fcce2.

Triadic: hues 8°, 128°, 248° give #e2553f, #3fe255, #553fe2.

Copied as CSS, the triadic palette is:

:root { --color-1: #e2553f; --color-2: #3fe255; --color-3: #553fe2; }

Text contrast on those swatches: #e2553f gives 3.74:1 with white text and 4.10:1 with dark text; #3fe255 gives 1.71:1 with white text and 8.94:1 with dark text; #553fe2 gives 6.57:1 with white text and 2.33:1 with dark text. A ratio of 4.5:1 or more passes AA.

The same palette as a Tailwind block:

colors: { brand: { 1: '#e2553f', 2: '#3fe255', 3: '#553fe2', }, },

Limits

  • Hue rotation in HSL treats every hue as equally bright, but the eye doesn't: a yellow and a blue at the same HSL lightness look very different. You may want to nudge some swatches lighter or darker.
  • The palettes follow color-wheel rules; they don't know your brand, audience or content. Treat them as starting points.
  • Gray, black and white have no hue, so rotating them returns the same color. Use the monochromatic palette for those.
  • The AA marks only test white (#ffffff) and the site's dark text (#22252a) on each swatch. They don't test one palette color on another; use the contrast checker's palette matrix for that.
  • The Tailwind export is a colors object for a JavaScript config file. Tailwind CSS v4 projects that configure colors in CSS can paste the CSS export into an @theme block instead, renaming the variables to --color-brand-1 and so on.

FAQ

What is a complementary color?

The color directly opposite on the color wheel, 180° of hue away. Complementary pairs give the strongest contrast of hue, which is why they work for calls to action against a background.

Which palette type should I use?

Analogous palettes feel calm and related; complementary and split-complementary add one strong accent; triadic and tetradic are lively and work best when one color leads and the others are used sparingly; monochromatic is the safest for interfaces.

How do I use the copied CSS?

Paste the :root block into your stylesheet, then use a color with var(), for example color: var(--color-2). Rename the variables to describe their job, such as --brand or --accent.

How do I add the palette to Tailwind?

Press Tailwind to copy a colors block, paste it inside theme.extend in tailwind.config.js, and use classes such as bg-brand-1 or text-brand-3. Rename brand to something that fits your project.

Why does my gray base color give the same color in every swatch?

Gray has a saturation of 0, so it has no hue to rotate. Every rotated version is the same gray. Choose a color with some saturation, or use the monochromatic option for lighter and darker grays.

Is this the same as the color wheel in my design app?

It uses the same idea, the HSL hue circle. Some design apps use a painter's red-yellow-blue wheel instead, so their complements can differ from the ones here.