Contrast Ratio Calculator

Find the WCAG contrast ratio between two luminances.

Contrast ratio (:1) 4.2

Formula: ratio = (Lmax + 0.05) / (Lmin + 0.05)

Step-by-step with your numbers:
1. Values used:
2. Luminance 1 (0-1) = 1
3. Luminance 2 (0-1) = 0.2
4.
5. Contrast ratio = 4.2:1
Did we solve your problem today?

Contrast ratio measures how distinguishable two colors are, key for accessible design.

The math behind it

ratio = (lighter + 0.05) / (darker + 0.05) using relative luminance. WCAG wants 4.5:1 for normal text.

Worked example

Luminances 1 and 0.2 give a 4.2:1 ratio.

FAQ

What ratio passes WCAG AA?

4.5:1 for normal text, 3:1 for large text.