Tips & Tricks

Contrast Checker: How to Choose Accessible Colors for Your Website

Understand WCAG contrast ratios and fix colour pairs that are hard to read.

Contrast Checker: How to Choose Accessible Colors for Your Website
On this page
  1. What is a contrast ratio?
  2. Step-by-step
  3. Fixing a failing palette without losing your brand
  4. Practical examples
  5. Common mistakes
  6. Conclusion

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.

LevelNormal textLarge text
AA4.5:13:1
AAA7:14.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

  1. Enter your colours. Use the pickers, HEX fields or RGB inputs for text and background.
  2. Read the ratio. The checker calculates it with the WCAG formula and doesn’t round up, so a pass is a real pass.
  3. Check each result. AA and AAA for normal and large text, plus UI components.
  4. Look at the live preview at different text sizes.
  5. Apply a suggested fix if needed. The tool finds the closest lighter or darker version of your colour that passes, keeping the same hue.
Contrast CheckerCheck colour contrast against WCAG AA and AAA. Free, no sign-up.Try it free on HandyBear

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.

Contrast CheckerCheck colour contrast against WCAG AA and AAA. Free, no sign-up.Try it free on HandyBear
HandyBear Team

The HandyBear team writes practical, no-fluff guides to help you get everyday digital jobs done with free tools.

All articles →