Color Contrast Matrix Checker

Batch check WCAG contrast ratios for multiple color combinations

Color 1
Color 2
Color 3
Color 4

Normal: AA ≥ 4.5, AAA ≥ 7.0 · Large: AA ≥ 3.0, AAA ≥ 4.5

Why check every color combination at once, not one pair at a time?

WCAG accessibility guidelines require a minimum contrast ratio between text and background colors, or users with low vision or color blindness may not be able to read your text. In practice, most sites mix several brand colors, background colors, and status colors — a primary-colored heading over a light-gray card, a warning color over white, dark text over a tinted background — and checking each pairing one at a time is easy to get wrong or simply forget. This tool lets you paste every color you actually use and instantly computes the contrast ratio for every possible pair, laid out as one matrix — no more checking combinations one by one.

How the ratio is calculated — a concrete example

WCAG contrast is (L1 + 0.05) / (L2 + 0.05), with the lighter color’s relative luminance first. Black on white is 21:1; #999999 on white is about 2.85:1. Normal text requires 4.5:1 for AA or 7:1 for AAA. Large text means at least 24px, or bold at least 18.67px, and requires 3:1 for AA or 4.5:1 for AAA.

How to read the result matrix

Each cell uses the row color as its background and the column color as its text, with a ratio and AA, AAA or fail label. Decisions use the unrounded ratio; displayed values have two decimals. This check alone does not establish WCAG conformance for a page.

Contrast is calculated purely from each color's RGB value — it doesn't account for font weight, anti-aliasing, or semi-transparent overlays in actual rendering. Always double-check on a real device before shipping.