Home › Developer & Design › Color Contrast Checker
Color Contrast Checker
See whether your text colour is readable on its background.
Large sample heading
This is how normal sized text looks with these colours.
How to check two colours
- Enter hex codes or use the colour pickers.
- Look at the sample text.
- Read the ratio and the pass or fail results.
Understanding the ratio
The ratio runs from 1:1, for identical colours, to 21:1 for black on white. It uses the relative brightness of the colours as defined in the Web Content Accessibility Guidelines (WCAG).
Minimum ratios
| Level | Normal text | Large text |
|---|---|---|
| AA | 4.5:1 | 3:1 |
| AAA | 7:1 | 4.5:1 |
Large text generally means at least 18 point (about 24 pixels), or 14 point (about 18.7 pixels) when bold. The tool rounds the displayed ratio down, so a borderline pair is not shown as higher than it is.
Improving a weak pair
Darken the darker colour or lighten the lighter one. Changing only the hue often has little effect. Light grey text on white is a frequent problem.
Beyond the numbers
- Check links, buttons, placeholder text and disabled states.
- Do not use colour alone to show errors or status.
- Test text over photographs at its weakest point.
- Try the design on a phone in bright light.
Example
Black on white gives the maximum 21:1. A mid grey such as #777777 on white is just under 4.5:1, so it fails Level AA for normal text although it passes for large text. Darkening it slightly to #767676 reaches the AA threshold. Small differences like this are why measuring is more dependable than judging by eye.
Frequently Asked Questions
Does passing make a website accessible?
No. Contrast is one requirement among many.
Can I enter short codes?
Yes. #fff is read as #ffffff. Transparent colours are not supported.