Contrast Checker
Check WCAG contrast ratios between any two colors. See pass/fail badges for AA and AAA at normal and large text sizes, with a live preview.
What is contrast ratio?
Contrast ratio is a number from 1:1 (no contrast) to 21:1 (pure black on pure white) that describes how distinguishable a foreground color is from its background. The Web Content Accessibility Guidelines (WCAG) use this number as the legal benchmark for whether text is readable by people with low vision, color-blindness, or by anyone reading on a glare-affected screen. The higher the ratio, the safer the choice — and the more universally readable your interface.
How to use this checker
Pick your text color in the foreground picker and the surface behind it in the background picker — or paste hex codes directly. The live preview repaints in real time so you can see exactly what users will see, and the four badges tell you which WCAG levels you pass at a glance. Use the Swap button to invert the pair when you're sketching a dark-mode variant or testing inverted call-to-action buttons.
Best practices
Aim for AA Normal (4.5:1) on body copy as the absolute minimum, and target AAA Normal (7:1) when accessibility is a brand value. Don't chase the bare minimum — borderline ratios fail on cheap monitors and outdoors. Test your actual colors at the actual size you'll ship, not approximations from a brand swatch. Remember that disabled states, placeholder text, and ad copy still count as text — they need contrast too. Never use color alone to convey meaning; pair it with icons, underlines, or labels.
The math behind the ratio
WCAG calculates contrast from relative luminance, not from raw RGB values. Each channel is first linearized from sRGB — values below 0.03928 are divided by 12.92, the rest go through ((c + 0.055) / 1.055)2.4. Luminance is then L = 0.2126·R + 0.7152·G + 0.0722·B, weighted because the human eye is most sensitive to green and least to blue. The ratio is (Llighter + 0.05) / (Ldarker + 0.05). The + 0.05 term models reflected ambient light on real screens and is what caps the maximum at 21:1.
WCAG conformance levels at a glance
AA Normal: 4.5:1 minimum for body text under 18pt (or 14pt bold). AA Large: 3:1 for text 18pt+ (or 14pt+ bold). AAA Normal: 7:1 — the enhanced level recommended for sites that aim for the highest readability standard. AAA Large: 4.5:1 — large text under the enhanced bar. Non-text UI components (icons, focus rings, form borders) need at least 3:1 against their adjacent surface to satisfy WCAG 2.1 SC 1.4.11.
EN
PT
ES