Enter a text colour and a background colour to get the WCAG contrast ratio and pass or fail verdicts for AA and AAA, at normal and large text sizes.
Preview, text on background:
Sample paragraph text in the chosen colours, at a normal reading size.
Preview, reversed:
Sample paragraph text with the two colours swapped.
The checker converts each colour to relative luminance using the WCAG formula (each sRGB channel is linearised, then combined as 0.2126 R + 0.7152 G + 0.0722 B) and divides the lighter luminance plus 0.05 by the darker plus 0.05. WCAG AA requires a ratio of at least 4.5:1 for normal text and 3:1 for large text; AAA requires 7:1 and 4.5:1. Large text means at least 24 px, or about 19 px when bold.
What contrast ratio does body text need? WCAG AA, the level most standards point to, requires at least 4.5:1 for normal text and 3:1 for large text. AAA is stricter at 7:1 and 4.5:1.
What counts as large text? Text of at least 24 px, or roughly 19 px and bold, counts as large text under WCAG and has lower minimum ratios.
Does a passing ratio guarantee readable text? No. Font size, weight, line length and lighting also matter. A passing ratio is the measurable minimum, not the whole of readable design.