WCAG Contrast Checker
Test color contrast ratios to ensure your design meets WCAG accessibility standards for people with visual impairments.
What is WCAG Contrast?
The Web Content Accessibility Guidelines (WCAG) define minimum contrast ratios between text and background colors to ensure readability for users with visual impairments, including low vision and color blindness.
WCAG Standards:
- WCAG AA (Minimum): Requires 4.5:1 for normal text, 3:1 for large text (18pt+ or 14pt+ bold)
- WCAG AAA (Enhanced): Requires 7:1 for normal text, 4.5:1 for large text
How to Use This Tool:
- Select Colors: Use the color pickers or enter hex codes for your foreground (text) and background colors
- Check Contrast: Click the "Check Contrast" button to calculate the contrast ratio
- Review Results: See instant pass/fail indicators for both WCAG AA and AAA levels
- Preview Text: View sample text with your chosen colors to see real-world appearance
- Adjust if Needed: If your colors fail, adjust them until you achieve the required contrast ratio
How Contrast is Calculated:
The tool uses the WCAG contrast formula:
(L1 + 0.05) / (L2 + 0.05)
Where L1 is the relative luminance of the lighter color and L2 is the relative luminance of the darker color. Luminance is calculated from RGB values using the sRGB colorspace formula.
Example Calculations:
Black on White (#000000 on #FFFFFF): 21:1 ratio - PASSES all levels
Dark Gray on Light Gray (#666666 on #CCCCCC): 3.5:1 ratio - FAILS normal text, PASSES large text AA
Blue on White (#0000FF on #FFFFFF): 8.6:1 ratio - PASSES all levels
Why Contrast Matters:
- Legal Compliance: Many jurisdictions require WCAG AA compliance for public websites
- Better User Experience: High contrast benefits all users, especially in bright sunlight or on low-quality screens
- Wider Audience: Approximately 8% of men and 0.5% of women have some form of color vision deficiency
- SEO Benefits: Accessibility improvements can positively impact search rankings
Related Tools:
- Color Blindness Simulator - See how colors appear to users with color vision deficiencies
- CSS Color Contrast Checker - Alternative contrast checking tool
- Screen Reader Preview - Test how screen readers interpret your content
- ARIA Role Reference - Learn about ARIA roles for accessibility
- CSS Gradient Generator - Create accessible color gradients