Colour Contrast Ratio Calculator (WCAG)
Checks whether text is readable against its background under WCAG.
Contrast ratio
— : 1
Share sends a link that reopens these numbers. Copy details pastes the full breakdown as a list.
AA, normal text (4.5:1) —
AA, large text (3:1) —
AAA, normal text (7:1) —
AAA, large text (4.5:1) —
AA, interface parts and graphics (3:1) —
Reading this —
The formula
ratio = (L1 + 0.05) ÷ (L2 + 0.05) L = 0.2126 R + 0.7152 G + 0.0722 B
L1 is the lighter colour’s relative luminance and L2 the darker’s. R, G and B are first converted from sRGB to linear light. This is the WCAG formula.
What to watch out for
The ratio runs from 1:1, for identical colours, to 21:1 for black on white. Passing is a minimum, and thin fonts can still be hard to read.
Frequently Asked Questions
What is the contrast of black on white?
21:1, the highest possible.
Does #777777 on white pass AA?
No: 4.47:1 falls short of 4.5:1 for normal text, though it passes for large text.
Does the order of the colours matter?
No. The ratio always divides the lighter by the darker, so swapping them gives the same answer.