Loading...
Loading...
Test any text and background color pair against WCAG 2.2 AA and AAA contrast requirements, with instant pass/fail feedback and a live preview.
Higher ratios are more readable. 21:1 is pure black on white.
See your color pair on both body and heading sizes.
Normal body text at 16 pixels. WCAG 2.2 measures contrast between the foreground text and its immediate background — this preview shows the combination you entered above exactly as a user would see it.
A contrast checker measures the luminance difference between two colors and reports it as a ratio between 1:1 (identical) and 21:1 (pure black on pure white). Accessibility guidelines use that ratio to decide whether text is readable for users with low vision, color-blindness, or screens viewed in bright sunlight. This tool follows WCAG 2.2 — the same standard referenced by the ADA in the US, the European Accessibility Act, and most corporate design systems. Enter any two colors and you get an instant pass/fail across the five WCAG thresholds, plus a live preview at both body and heading sizes. Everything runs in your browser — no upload, no tracking, no account.
Paste a hex code or use the color picker for the foreground (text) color. The tool also accepts 3-digit shorthand like #03A.
Do the same for the background. If you only know the text color, leave the background on white (#FFFFFF) for the default test.
The big ratio number updates as you type. A ratio under 3.0 will fail even the loosest WCAG threshold for normal text.
The five badges show pass/fail for AA normal, AA large, AAA normal, AAA large, and UI-components thresholds. AA is the usual legal minimum; AAA is the enhanced target for key content.
Verify the preview looks right at heading and body size, then use Copy CSS to grab `color:` and `background-color:` declarations for your stylesheet.
For each channel (R, G, B scaled to 0–1): c_linear = (c ≤ 0.03928) ? c / 12.92 : ((c + 0.055) / 1.055)^2.4 Relative luminance: L = 0.2126·R_linear + 0.7152·G_linear + 0.0722·B_linear Contrast ratio: ratio = (L_light + 0.05) / (L_dark + 0.05) where L_light = max(L1, L2) and L_dark = min(L1, L2)
The formula comes from WCAG 2.x and applies a gamma-correction curve to each sRGB channel before computing luminance. The weights (0.2126, 0.7152, 0.0722) reflect human cone sensitivity to red, green, and blue light. Adding 0.05 to both terms prevents division-by-zero when one color is perfect black. Ratios range from 1:1 (identical colors) to 21:1 (pure black on pure white).
Reference: WCAG 2.2 — Contrast (Minimum) 1.4.3
| Pair | Ratio & verdict |
|---|---|
#000000 on #FFFFFF | 21:1 — passes every threshold The canonical maximum contrast. Used for long-form reading UIs. |
#1A73E8 on #FFFFFF | 4.63:1 — passes AA normal, fails AAA normal Google blue on white. Legal for body text, not quite AAA. |
#808080 on #FFFFFF | 3.95:1 — fails AA normal, passes AA large Medium gray on white — fine for headings, too light for paragraphs. |
Convert between HEX, RGB, and HSL with live swatches, sliders, and instant copy.
Calculate your exact age in years, months, and days from any date of birth.
Check body mass index from height and weight using metric or imperial units.
Work out percentages, percentage change, and percentage of a total in seconds.
Last updated