AA · normal text
Requires 4.5:1
Back to catalog
WCAG 2.2 contrast lab
Enter two opaque sRGB colors to calculate their contrast ratio, check WCAG AA and AAA text thresholds, preview the pair without hiding a failed result, and copy the exact CSS.
01 / Contrast ratio
WCAG ratios are threshold values: do not round a failing result up. Large text means at least 24 CSS px at normal weight, or about 18.7 CSS px when bold.
Requires 4.5:1
Requires 3:1
Requires 7:1
Requires 4.5:1
Implementation
The copied custom properties preserve the exact opaque values used by this calculation. Test every real state and surface where the pair appears.
--text-color: #111827;
--background-color: #F9FAFB;
color: var(--text-color);
background-color: var(--background-color);Published criteria
The calculation follows WCAG 2.2 relative luminance and contrast-ratio rules for sRGB colors. A numerical pass is evidence for this pair, not automatic certification of a page or product.
Normal text needs at least 4.5:1; large text needs at least 3:1 at Level AA.
Read the W3C guidanceNormal text needs at least 7:1; large text needs at least 4.5:1 at Level AAA.
Read the W3C guidanceEssential controls, states, and graphical objects generally need 3:1 against adjacent colors, but their actual boundaries must be tested in context.
Read the W3C guidance