Web Accessibility: Understanding Color Contrast
Color contrast is essential for accessibility and now a legal requirement in many countries. Learn what WCAG guidelines require and how to check your designs.
One in twelve men and one in two hundred women have some form of color vision deficiency. Proper color contrast ensures your website is readable for everyone — including people with visual impairments, the elderly, and anyone using a screen in bright sunlight. In many countries, meeting WCAG standards is now a legal requirement.
The WCAG Contrast Standard
The Web Content Accessibility Guidelines (WCAG) define minimum contrast ratios for text and backgrounds. WCAG Level AA requires a 4.5:1 ratio for normal-sized text and 3:1 for large text (18pt or 14pt bold). Level AAA requires 7:1 for normal text and 4.5:1 for large text — this is the gold standard for maximum accessibility.
How Contrast Ratio is Calculated
Contrast ratio is derived from the relative luminance of two colors. A ratio of 1:1 means no contrast at all (identical colors), while 21:1 is the theoretical maximum (pure black on pure white). The formula accounts for how human eyes perceive brightness — which is why yellow on white has surprisingly low contrast despite both being "bright".
Practical Tips for Better Contrast
Dark text on light backgrounds almost always outperforms light text on colored backgrounds. Avoid light gray text on white, which is a common design trend that fails accessibility checks. When using brand colors for text, always verify the contrast against the background. Interactive elements like buttons and links benefit from higher contrast ratios than body text.
How to Use the Contrast Checker
Enter your foreground and background colors using the color picker or hex input fields. The tool instantly calculates the contrast ratio and shows which WCAG levels (AA and AAA for both normal and large text) pass or fail. The live preview shows how your text combination actually looks at realistic sizes.