Contrast Checker
Fill Foreground and Background with six-digit hex values—defaults are black on white—then press Check. The result shows Ratio X.XX:1 with AA and AAA PASS or FAIL for normal text.
Enter two hex colors and click Check.
About this tool
Relative luminance follows the WCAG sRGB formula. Contrast is (Llighter + 0.05) / (Ldarker + 0.05). Normal-text AA needs at least 4.5:1; AAA needs 7:1. Large-text thresholds are not scored here.
How to use
- Open the checker: Load the page with Foreground, Background, and Check.
- Enter foreground hex: Type the text color, such as #000000.
- Enter background hex: Type the surface color, such as #ffffff.
- Click Check: Read Ratio, AA, and AAA status for normal text in the result div.
Common use cases
- Verify body copy colors against a page background before shipping UI.
- Compare brand ink on light and dark surfaces for accessibility notes.
- Catch gray-on-white pairs that look fine but fail AA for paragraphs.
- Document exact ratios in design QA without leaving the browser.
Tips
- Both fields need six hex digits; with or without # is fine.
- AA FAIL means raise contrast—darken text or lighten the background for body size.
FAQ
What does AA PASS mean?
The ratio is at least 4.5:1, meeting WCAG AA for normal text.
What about AAA?
AAA PASS requires at least 7:1 for normal text size.
Are large-text rules included?
No. This tool scores only the normal-text AA and AAA cutoffs.
Is black on white always 21:1?
Yes for pure #000000 on #ffffff under the WCAG luminance formula.