Skip to content
helpyself

Contrast Grid

Runs in your browser — your text is not sent anywhere to use this tool.

Save this tool

Keep Contrast Grid handy

Bookmark it

A contrast grid for your whole palette — every pairing checked against WCAG.

  1. Paste your palette — one colour per line, or comma-separated, in any notation.
  2. Choose the WCAG level you are designing to.
  3. Read down a column to see what can sit on that background.
  4. Screenshot the grid into your design spec, or fix a failing pair in the Contrast Fixer.

About this tool

A design system is not a list of colours, it is a list of pairings — and the question that actually comes up is which of these can go on which. Checking that one pair at a time means n² visits to a contrast checker. For a palette of eight that is sixty-four checks, which is why nobody does it, and why design systems ship with combinations nobody ever tested. This is a palette contrast checker that does all of them at once — a WCAG colour matrix for the whole set. Paste your palette and every colour is checked as text against every colour as a background, with the contrast ratio and the WCAG grade in each cell. Green passes the level you chose, amber clears the lower bar for large text only, red fails. Paste it in whatever form you already have. Hex, rgb(), hsl() or CSS colour names, separated by newlines, commas or spaces, with CSS custom property syntax still attached if that is what you copied — it reads all of it and tells you about anything it could not. The grid is also the thing worth keeping. It is built to be screenshotted straight into a design spec or a pull request, because the check happens once and the picture gets used for a year. Everything runs in your browser.

Frequently asked questions

How do I read the grid?

Each row is a colour used as text, each column is a colour used as a background. The cell where they meet is that pairing's contrast ratio. So reading down a column tells you everything that can legibly sit on that background.

Why is the diagonal empty?

That is each colour against itself, which is always 1:1 and is never a mistake anybody made. Marking it as a failure would open the grid with a diagonal line of red that tells you nothing.

What do the colours in the cells mean?

Green passes the level you selected. Amber clears 3:1, which is enough for large text — 18pt, or 14pt bold — but not for body text. Red fails everything.

How many colours can it take?

Up to 24. Beyond that the grid stops being readable and becomes wallpaper, which helps nobody — and a palette of more than 24 is usually several palettes that should be checked separately.

Can I paste straight from my CSS?

Yes. Custom property syntax is stripped, so lines like --brand-500: #3b82f6; work as they are, and duplicates are removed so a repeated colour does not waste a row and a column.

Help improve this tool

Found a bug, want a change, or need a tool we don't have?

/contrast-grid

↑↓ to move · Enter to open · Esc to close