Contrast Checker: How to Choose Accessible Colors for Your Website
Understand WCAG contrast ratios and fix colour pairs that are hard to read.
On this page
Light grey text on a white background might look elegant on your monitor, but for many people, including those with low vision, older eyes or a phone in bright sunlight, it can be genuinely hard to read. Colour contrast is one of the most common accessibility problems on the web, and one of the easiest to fix.
This guide explains contrast ratios and how to use the free Contrast Checker.
What is a contrast ratio?
The Web Content Accessibility Guidelines (WCAG) define contrast as a ratio between the relative luminance of two colours, from 1:1 (identical) to 21:1 (black on white). Higher numbers mean easier reading.
| Level | Normal text | Large text |
|---|---|---|
| AA | 4.5:1 | 3:1 |
| AAA | 7:1 | 4.5:1 |
“Large text” means at least 24 px regular or about 18.66 px bold. User-interface components and meaningful icons need at least 3:1 against their surroundings.
Step-by-step
- Enter your colours. Use the pickers, HEX fields or RGB inputs for text and background.
- Read the ratio. The checker calculates it with the WCAG formula and doesn’t round up, so a pass is a real pass.
- Check each result. AA and AAA for normal and large text, plus UI components.
- Look at the live preview at different text sizes.
- Apply a suggested fix if needed. The tool finds the closest lighter or darker version of your colour that passes, keeping the same hue.
Fixing a failing palette without losing your brand
- Keep your bright brand colour for backgrounds, illustrations and large headings, and use a darker shade for body text.
- Put dark text on bright yellows and light blues rather than white text.
- Create two versions of an accent: one for decoration and one that passes for text.
Practical examples
Yellow buttons: white text on bright yellow fails badly, while dark navy on yellow passes comfortably.
Muted grey captions: mid-grey on white often sits just under 4.5:1. Darkening it slightly usually fixes it with no visible change in style.
Colours from a photo: extract them with the Color Palette Extractor, then test text and background pairs here.
Common mistakes
- Checking only the main body text and forgetting placeholders, captions and disabled states.
- Placing text over images or gradients without checking the lightest area behind it.
- Relying on colour alone to convey meaning, such as red for errors without an icon or text.
Contrast is one part of accessibility. Good structure, clear language, keyboard support and descriptive alt text matter too.
Conclusion
Aim for at least AA everywhere and AAA for long-form reading where you can. The Contrast Checker is free, accurate and suggests fixes that keep your colours recognisable.
Related articles
All articles →Color Palette Extractor: How to Find Beautiful Color Palettes From Any Image
Use any image as inspiration: extract its main colours, copy HEX and RGB codes, find complementary accents and export a palette.
JSON Workbench: How to Format, Validate and Compare JSON
A developer-friendly guide to formatting, minifying and validating JSON, reading error locations and comparing documents.
Meeting Time Planner: How to Find the Best Meeting Times Across Time Zones
Schedule international meetings with confidence: compare local times, spot shared working hours and share a clear summary.