Check the WCAG contrast ratio between a text color and its background, and see exactly which AA / AAA levels it passes.
Large headings, body copy, and the small print all need to clear the bar. This paragraph is regular body text at 16px — the size most of your readers actually see.
Small caption text · 12px · the hardest case to pass.
WCAG measures contrast as a ratio from 1:1 (identical) to 21:1 (black on white). Body text should hit 4.5:1 for AA and 7:1 for AAA. Large text (18px bold or 24px regular) and non-text UI elements only need 3:1.
WCAG contrast compares the relative luminance of two colors as a ratio from 1:1 (identical) to 21:1 (black on white). The tool computes that luminance for your foreground and background, divides the lighter by the darker, and checks the result against the WCAG thresholds for each conformance level and text size.
Enter your text color and its background color as HEX or with the pickers.
See the exact ratio plus pass/fail marks for AA and AAA at normal and large text.
Darken the text or lighten the background (or vice versa) and watch the ratio climb past the threshold you need.