Color Contrast Checker
Check WCAG color contrast ratio for accessibility compliance.
Check whether text is readable against its background using the WCAG contrast ratio, from 1:1 (no contrast) to 21:1 (black on white). Enter a text colour and a background colour in any format, and see whether they pass AA and AAA for normal text, large text and user-interface parts. AA needs 4.5:1 for normal text and 3:1 for large text and UI components; AAA needs 7:1 and 4.5:1. A preview shows the colours together, and you can swap them with one click.
Large heading text
Normal body text should be easy to read for everyone, including people with low vision.
Small print and captions need even more contrast.
- Contrast ratio
- 4.83:1
- Normal text
- AA
- Large text
- AAA
from 1:1 to 21:1
| Normal text, AA | needs 4.5:1 | Pass |
| Normal text, AAA | needs 7:1 | Fail |
| Large text (24px, or 19px bold), AA | needs 3:1 | Pass |
| Large text, AAA | needs 4.5:1 | Pass |
| UI components & graphics, AA | needs 3:1 | Pass |
Ratios follow WCAG 2.2 (relative luminance of sRGB colors). The ratio is shown truncated to two decimals; pass or fail uses the exact value.
Common use cases
- Check website colours meet WCAG accessibility guidelines
- Choose a readable text colour for a brand background
- Test button and icon colours against their background
- Fix low-contrast text flagged by an accessibility audit
How to use
- Enter the text colour and the background colour as HEX, RGB, HSL or a colour name.
- Read the contrast ratio and the pass or fail results.
- Swap the colours to check the reverse.
- Adjust a colour until it passes the level you need.
FAQ
What contrast ratio do I need?
For WCAG level AA: 4.5:1 for normal text, and 3:1 for large text and for user-interface components and graphics. For AAA: 7:1 for normal text and 4.5:1 for large text.
What counts as large text?
In WCAG, large text is at least 18 point (24 CSS pixels), or 14 point (about 19 pixels) if bold.
How is the contrast ratio calculated?
From the relative luminance of the two colours: (lighter + 0.05) ÷ (darker + 0.05). Luminance weights green most and blue least, matching how bright colours look to people.
Related tools
- Color PickerPick colors visually and get HEX, RGB, and HSL values.
- HEX to RGBConvert HEX color codes to RGB values.
- Color Blindness SimulatorSimulate how images appear to colorblind users.
- Color Wheel: Find Matching ShadesFree online color wheel: pick a shade and see its complementary, analogous, triadic and other schemes, on a…
- RGB to HEXConvert RGB color values to HEX color codes.
- HSL to RGBConvert HSL color values to RGB format.
- Color Palette GeneratorIn Generators