WCAG Contrast Checker
Enter foreground and background colors to instantly get the WCAG 2.1 contrast ratio and pass/fail status for AA and AAA at every text size.
Contrast Ratio
—
AA Normal
Requires 4.5:1
—
AA Large
Requires 3:1
—
AAA Normal
Requires 7:1
—
AAA Large
Requires 4.5:1
—
Live Preview
Normal Text (16px)
The quick brown fox jumps over the lazy dog.
Large Text (24px / 18pt)
Accessible design matters.
Bold Large Text (18.67px / 14pt bold)
Bold text for UI components.
UI Component Sample
Color Details
Foreground RGB
—
Foreground Luminance
—
Background RGB
—
Background Luminance
—
Summary
Enter foreground and background colors to instantly get the WCAG 2.1 contrast ratio and pass/fail status for AA and AAA at every text size.
How it works
- Enter or pick a foreground (text) color using the hex input or color picker.
- Enter or pick a background color using the second hex input or color picker.
- The tool computes relative luminance for each color using the sRGB formula.
- The contrast ratio is displayed alongside pass/fail badges for all four WCAG criteria.
- Use the Swap button to reverse the two colors and re-check instantly.
- A live preview shows how your text looks at normal and large sizes on the chosen background.
Use cases
- Verify UI designs satisfy WCAG 2.1 AA before shipping to production.
- Audit existing web pages for accessibility compliance.
- Choose accessible color combinations during brand or design system development.
- Confirm legal compliance requirements for government, healthcare, or finance sites.
- Test button label and icon color pairs against their background.
- Educate designers and developers on accessibility color requirements.
Frequently Asked Questions
Related tools
Last updated: 2026-05-29 ·
Reviewed by Nham Vu