Color contrast ratio
Also called: Contrast ratio, Colour contrast, 4.5:1
A measure of the luminance difference between two colors, from 1:1 to 21:1, used by WCAG to set minimum contrast for text and UI.
Definition
WCAG defines contrast ratio as (L1 + 0.05) / (L2 + 0.05), where L1 is the relative luminance of the lighter of the colors and L2 of the darker. Ratios range from 1 to 21, written 1:1 to 21:1. Black on white is 21:1.
The thresholds: 1.4.3 Contrast (Minimum), Level AA, asks for at least 4.5:1 for text and 3:1 for large text (at least 18 point, or 14 point bold: about 24px or 18.7px bold). 1.4.11 Non-text Contrast asks for 3:1 for UI component boundaries, icons and graphics needed to understand content. 1.4.6, Level AAA, raises text to 7:1.
Why it matters
Low contrast makes text hard or impossible to read for people with low vision or color vision deficiency, and for everyone on a phone in sunlight. It is also the most common failure measured on the web: WebAIM's 2026 Million report found low-contrast text on 83.9% of the top one million home pages. Light gray text on white, placeholder text and text over photos are the usual culprits.
WCAG compares the unrounded ratio: 4.48:1 fails 4.5:1, even if a tool shows it as 4.5.
How to test or meet it
Check every text color against its actual background, including hover, focus, disabled-looking (but active) and error states. Our contrast checker computes the ratio and shows which thresholds pass.
Automated scanners test contrast for most plain text. They cannot reliably measure text over images or gradients, or text drawn in images, so check those by hand. Contrast of icons and borders under 1.4.11 also needs a manual check.
WCAG criteria
- 1.4.3 Contrast (Minimum) (Level AA)
- 1.4.6 Contrast (Enhanced) (Level AAA)
- 1.4.11 Non-text Contrast (Level AA)
- 1.4.1 Use of Color (Level A)
Tools and guides
Related terms
Sources
By the Perceivly team · Published . This explains a term; it is not legal advice.