WCAG Contrast Checker
Calculate contrast from foreground and background relative luminance and compare AA/AAA thresholds for normal and large text. This checks one colour relationship rather than certifying an entire page.
- Runs in your browser
- Nothing is uploaded
- No signup; device limits apply
Loading the tool. If it does not appear, reload this page.
How to use this tool
Enter supported hexadecimal colours. Text over transparency, images or gradients needs the actual composited background, so a single uncomposited colour pair may not describe the visible result.
Results and examples
Black on white has a 21:1 ratio. AA requires 4.5:1 for normal text and 3:1 for qualifying large text; a ratio of 4.499 must not be rounded into a pass.
Limitations
- Large-text thresholds require the specified size and weight conditions, not a subjective impression.
- Keyboard operation, labels and semantic structure need separate accessibility checks.
Fields
| Field | Guidance and constraints |
|---|---|
| Foreground (text) HEX | Check the unit and format displayed beside this field. |
| Background HEX | Check the unit and format displayed beside this field. |
Data handling
Processing stays in the current browser tab; the site does not upload tool input for the calculation itself.
Sources
Frequently asked questions
What is black-on-white contrast?
Black on white has a 21:1 ratio. AA requires 4.5:1 for normal text and 3:1 for qualifying large text; a ratio of 4.499 must not be rounded into a pass.
Does a pass certify the whole page?
Large-text thresholds require the specified size and weight conditions, not a subjective impression. Keyboard operation, labels and semantic structure need separate accessibility checks.