Skip to main content

Accessible Palette Generator

Generate colour pairs that meet the contrast ratio you choose.

Last updatedHow we build & check our tools

Interactive Tool

Loading interactive tool…

Enter your values once it appears to see your results.

Results will appear here once the tool finishes loading. Everything runs locally in your browser.

How the palette is built

Start from one brand colour and the generator produces candidate colours that keep its hue while shifting lightness until the pair reaches your chosen ratio: text on the original brand colour, plus pairs on white and black. Roles such as primary, secondary, accent, success, warning and error each get their own measured pair.

The ratio targets map to WCAG success criteria: 3:1 covers large text and non-text contrast (1.4.3 and 1.4.11), 4.5:1 covers normal body text (1.4.3), and 7:1 is the enhanced level (1.4.6). The exact measured ratio is shown for every pair, so you can compare rather than trust a pass/fail tick.

Which ratio to use where

For most sites, pick pairs like this:

  • 4.5:1 — body text and anything under 24px (or under 18.66px bold).
  • 3:1 — large text (24px+, or 18.66px bold and larger) and the parts of interface people must see to use it: input borders, icons, focus rings, chart lines.
  • 7:1 — body text if you are targeting AAA, or content read in poor conditions (e-readers, sunlight, older screens).

One background change can flip a passing pair into a failing one, so measure each colour against the exact background it ships on.

A palette is a starting point, not a certificate

Generated pairs are candidate colours, not a WCAG compliance claim. Contrast is one requirement among many: the generator cannot know that your accent colour doubles as the only error indicator (colour alone must never carry meaning), how the palette behaves for readers with colour-vision deficiency, or where a semibold 20px heading ends up on your real components.

Before locking a palette in: check the pairs on live components in both light and dark themes, and run key colours through a colour-blindness simulation. If a brand hue cannot reach 7:1 without looking muddy, that is a real constraint — choose the highest ratio the hue can honestly support and keep body text on a different pair.

Frequently Asked Questions

Common questions about the Accessible Palette Generator

For WCAG AA, body text needs 4.5:1, large text (24px and up, or 18.66px bold and up) needs 3:1, and non-text elements such as icons, input borders and focus rings also need 3:1. Choose 7:1 only if you are targeting AAA or expect difficult reading conditions.

Sources & References

Contrast (Minimum) 1.4.3

Text pairs need at least 4.5:1, or 3:1 for large text. These are the ratios the palette targets.

Non-text Contrast 1.4.11

Interface colours need at least 3:1 against their background.