Enter a text color and background color to see the WCAG contrast ratio and pass/fail results.
Large text sample (24px+)
Regular text sample looks like this at normal size.
—contrast ratio
AA normal text—
AA large text—
AAA normal text—
AAA large text—
How it works
Each color's relative luminance is computed with the WCAG formula — converting sRGB channels to linear light with a gamma curve, then weighting them 0.2126 red, 0.7152 green, 0.0722 blue to match human eyes' sensitivity to each — and the contrast ratio is (lighter luminance + 0.05) / (darker luminance + 0.05). That ratio is checked against WCAG's four published thresholds: 4.5:1 for AA normal text, 3:1 for AA large text, 7:1 for AAA normal text, and 4.5:1 for AAA large text.
FAQ
Why does green count for more than red or blue in the luminance formula?
Because the WCAG luminance formula (0.2126R + 0.7152G + 0.0722B) is weighted to match human vision, and human eyes are far more sensitive to green light than to red or blue — two colors with identical RGB brightness can have very different perceived luminance if one leans green and the other leans blue.
What counts as "large text" for the more lenient thresholds?
WCAG defines large text as 18pt (24px) regular weight or 14pt (18.66px) bold — anything smaller must meet the stricter normal-text ratios (4.5:1 for AA, 7:1 for AAA) since small text is harder to read at low contrast.
Free, unlimited, no account. If this saved you a paid tool, a small thanks is appreciated.