Free WCAG color contrast checker
Enter a text color and a background color to calculate their exact contrast ratio and check them against WCAG AA and AAA requirements. The live preview shows both normal and large text, while the pass/fail grid makes it easy to see which accessibility levels the pair meets.
How to check color contrast
- Choose or type the foreground and background HEX colors.
- Review the ratio and the four WCAG pass/fail results.
- Swap the colors if needed; the ratio remains the same.
- Copy the generated CSS when you find an accessible combination.
Understanding WCAG contrast levels
A ratio of 1:1 means there is no luminance difference; black on white is 21:1, the maximum. For most body text, aim for at least 4.5:1. Large text may use 3:1 at level AA, while level AAA raises the normal-text target to 7:1. Contrast alone does not guarantee accessibility, so also test focus states, font sizes, keyboard navigation, and non-color cues.