Every pair of a palette, graded against WCAG 2.2 in one table

Color palette contrast matrix

Paste up to 10 colors and the matrix gives the WCAG contrast ratio of every pair, text color down the side and background across, each graded AA (4.5:1 or more), AA large (3:1 or more) or fail, with rows for black and white text. It shows which colors can carry text on which before they reach your site. The matrix is a tool of Recolor (recolor.page), a website color changer, which keeps text readable when it repaints a real page.

Last updated

Check a palette

Paste a Coolors link, a Recolor link or 2 to 10 hex codes. The matrix follows as you type.

Text color down the side, background across the top: the WCAG 2 contrast ratio of each pair and its grade.

Contrast matrix
Text on#264653#2a9d8f#e9c46a#f4a261#e76f51
#264653Same color3.03:1AA large6.03:1AA4.88:1AA3.25:1AA large
#2a9d8f3.03:1AA largeSame color1.98:1Fail1.61:1Fail1.07:1Fail
#e9c46a6.03:1AA1.98:1FailSame color1.23:1Fail1.85:1Fail
#f4a2614.88:1AA1.61:1Fail1.23:1FailSame color1.50:1Fail
#e76f513.25:1AA large1.07:1Fail1.85:1Fail1.50:1FailSame color
Black2.08:1Fail6.31:1AA12.56:1AA10.18:1AA6.79:1AA
White10.07:1AA3.32:1AA large1.67:1Fail2.06:1Fail3.09:1AA large

See these on a page: Recolor opens with the palette and keeps the text of any page you load readable in it.

From WCAG 2.2 (W3C Recommendation, 12 December 2024) and its Understanding documents, checked October 8, 2026
Grade in the matrixContrast ratioWhat WCAG 2.2 asks it of
AA4.5:1 or moreNormal text and images of text, success criterion 1.4.3
AA large3:1 or moreLarge text, 18 point or 14 point bold (1.4.3); interface components and graphics (1.4.11)
FailUnder 3:1Fine for decoration, never for text or controls
Not marked7:1, or 4.5:1 for large textLevel AAA, success criterion 1.4.6

How to read the matrix

Each row is a text color and each column a background. A cell shows a sample of the text on that background, the contrast ratio, and its grade. The ratio depends only on how light the two colors are, so the text color and the background can swap places and the ratio stays the same: the matrix mirrors across its diagonal, where a color meets itself. The last two rows put black and white text on every color of the palette.

Ratios are cut to two decimals, never rounded up. WCAG compares the exact value, and its Understanding document on 1.4.3 is explicit that a pair just under 4.5:1 fails, so a cell never shows 4.50:1 for a pair that does not reach it. How the ratio is computed, from each color's relative luminance, is worked through in black or white text on a color.

What the matrix is for

A palette of five colors has ten pairs, and most of them will never be text on background. The matrix finds the ones that can. In the example palette, 2 of the 10 pairs reach AA, 2 only AA large, and 6 fail; the strongest pair, #264653 on #e9c46a, reaches 6.03:1. That is typical: mid tones fail with each other, and text needs a dark color on a light one or the reverse.

Read it by role. Body text needs AA against the page's background. A button's label needs AA against the button, or AA large when the label is large. The button itself, an input's border and a chart's lines need 3:1 against what is next to them, which is why the AA large cells count for shapes too. The black and white rows give the fallback: on every color of the example palette one of the two reaches AA, and that holds for any color, as the black or white guide shows. Which color should do which job is the subject of how many colors a website palette needs.

Where Recolor takes over on a real page

The matrix judges pairs in the abstract. On a real page the pairs are given: this text sits on that background. When Recolor repaints a page, its engine finds the text and what it sits on, up to 3,000 text elements, and keeps the 150 heaviest pairs. The mapping then checks each pair under the new palette. Where one would read worse than it did on the original page and worse than 4.5:1 (3:1 for large text), the colors that moved give back just enough lightness to read again. The rules are in Strength, neutral tint and overrides, and why lightness rather than hue decides contrast is in keeping a palette accessible.

So the two work together: the matrix to choose a palette with enough contrast in it, See these on a page to watch it on your own site with the text kept readable.

Other contrast checkers

Coolors' contrast checker compares one text color with one background and reports AA and AAA for normal and large text; its page puts contrast checks for a whole palette in Pro. Contrast Grid (contrastgrid.com) builds a grid like this one from a list of colors in almost any format, can take a separate list for the other axis, and keeps the grid in its address. Use it when your text colors and backgrounds are different sets, or when you want names on the colors.

This matrix reads what Recolor reads: a Coolors link, a Recolor link or share page, or hex codes, up to 10 colors, and its link opens the same palette in Recolor. For a palette from Coolors, the converter turns the same link into Tailwind or CSS code.

Common questions

Does the matrix check WCAG AAA?

No. It grades AA and AA large. A ratio of 7:1 or more also meets AAA for normal text, and 4.5:1 for large text.

Do the AA large cells pass for buttons and icons?

Yes, for the shapes: WCAG 2.2 asks 3:1 of interface components and meaningful graphics against what is next to them. A button's label is text and needs 4.5:1, or 3:1 when large.

Is the contrast of A on B the same as B on A?

Yes. The ratio depends only on the two colors' relative luminance, so the matrix mirrors across its diagonal.

Does 4.47:1 round up to a pass?

No. WCAG compares the exact ratio, and the matrix cuts to two decimals instead of rounding, so it never shows a fail as 4.50:1.

Can I check more than ten colors?

No. Recolor's palettes have 2 to 10 colors, and the matrix takes the same.

Does the tool send my colors anywhere?

No. It computes in your browser, and the palette goes into the page's own address after the #, so you can share a matrix by its link.

Sources