Colour Palette Generator

Choose a starting colour and a scheme and the matching colours appear as tiles. Click a tile to copy its hex code, or copy the whole set as CSS variables. Each tile also shows how it reads against white and black text, using the WCAG contrast ratio.

How to use the Colour Palette Generator

  1. Pick a base colour with the colour box or type a hex code such as #3366cc.
  2. Choose a scheme. Complementary gives a strong pair; analogous and shades give calm sets.
  3. Click any tile to copy its hex code, or press Copy CSS variables for the whole palette.
  4. Check the contrast notes before using a colour behind text; WCAG asks for at least 4.5:1 for normal text.

How the schemes are built

Colour schemes come from the colour wheel, where hue is an angle from 0 to 360 degrees. The complement sits 180 degrees away, a triad uses 0, 120 and 240 degrees, and a square (tetradic) scheme uses 0, 90, 180 and 270.

Check by hand with pure red, hue 0: its complement at 180 degrees is #00ffff (cyan), and its triad is #ff0000, #00ff00 and #0000ff. Analogous colours sit 30 degrees either side of the base, and shades keep the hue and saturation and change only lightness.

Contrast and accessibility

The contrast ratio compares the brightness of two colours, from 1:1 (identical) to 21:1 (black on white). WCAG 2.2 level AA asks for at least 4.5:1 for normal text and 3:1 for large text (W3C WCAG 2.2, see Sources).

A pleasing palette is not automatically a readable one. Use the white and black ratios on each tile to choose a text colour, and keep one neutral background so the bright colours act as accents.

Frequently asked questions

What is the difference between analogous and triadic?

Analogous colours are neighbours on the wheel, 30 degrees apart, so they look calm. Triadic colours are 120 degrees apart, so they look lively and need a dominant colour to stay balanced.

Do these colours go well together in every case?

The scheme gives a starting point based on hue only. Adjust saturation and lightness for your design, and test them in context.

Which format are the codes in?

Hex, like #1a2b3c, which works in CSS, design tools and most editors.

Is anything sent to a server?

No, the colours are calculated in your browser.

Sources

Last reviewed