WCAG (Web Content Accessibility Guidelines)
The W3C standard for digital accessibility, including the contrast ratios required for legible text on the web.
Definition
WCAG is the official accessibility standard for the web, published by the W3C. The current version is WCAG 2.1 (with 2.2 emerging). For color, WCAG specifies minimum contrast ratios between text and its background to ensure legibility for people with low vision: AA requires 4.5:1 for body text and 3:1 for large text (18pt+); AAA requires 7:1 and 4.5:1 respectively.
Formula
Contrast ratio = (L1 + 0.05) / (L2 + 0.05), where L1 is the relative luminance of the lighter color and L2 the darker. Ranges from 1:1 (no contrast) to 21:1 (black on white).
Example
Black text on white = 21:1 (AAA). White text on Mauve (#E0B0FF) = 1.85:1 (Fail). Use the Contrast Checker to test any pair.