Skip to content

WCAG contrast checker

Checks contrast between two colors against WCAG 2.1 — AA and AAA for normal and large text.

Computes the contrast ratio of two colors per the WCAG 2.x standard: sRGB to relative luminance via the gamma function, divide the lighter luminance by the darker one (with a +0.05 adjustment). Shows pass/fail badges for four thresholds — AA/AAA for normal and large text — plus a separate threshold for UI components and graphics (≥ 3:1). A live preview underneath renders real text in the chosen colors. All computed in the browser.