Use sufficient color contrast

When text contrasts poorly with its background, it makes reading more difficult, especially for people with low vision. The same goes for icons and situations where highlighting is used to draw attention (such as the hover effects on links).

This example shows two color combinations: one that has a low contrast ratio and one that has a high contrast ratio.

Contrast

  • Use sufficient contrast. Make sure that the contrast ratio between text color and background color is at least 4.5:1. There are color-contrast tools that can help you test color pairs for contrast and adjust the values as necessary.
  • Avoid very high contrast. Be aware also that for some people, especially people with dyslexia, a very high contrast color scheme can make reading more difficult. It’s a good idea to choose an off-white background color rather than a white background to aid on-screen reading.

Testing

Check text and background color combinations on the page, using a color contrast checking tool:

  • Is the contrast ratio at least 4.5:1 (or 3:1 for large text)?

Resources

✎ Technique: Checking color contrast

Color-contrast-checking tools can compare two colors and report on the contrast ratio between them. Some tools will allow you to adjust these values until the ratio is sufficient, helping you to choose a color scheme that avoids contrast problems.

Examples

The following example shows a Color Contrast Analyser screenshot, indicating a passing contrast ratio of 6.66:1 between the white foreground color of some text and the blue color of the text's background.

Color Contrast Checking