Logo

What are you looking for?

Get help straight from our team...

Accessibility Tips

Optimize color contrast

Ensure sufficient contrast between text and background colors to improve readability, especially for users with visual impairments. This enhances overall accessibility of the page.

Last updated on 11 Nov, 2025

***This document provides helpful tips to improve your site's accessibility. While it doesn’t guarantee 100% compliance, it’s a great starting point to make your website more inclusive and user-friendly.***

Identification:

  • Rule ID: color-contrast

  • Part of: axe-core 4.10

  • Severity: Serious

 

Applicable Standards:

  • WCAG 2.0, 2.1, 2.2 (Level AA)

  • Trusted Tester

  • EN 301 549

 

Impact:

  • Affects users with low vision and colorblindness

  • Approximately 8% of men and 0.4% of women in the US have some form of color vision deficiency

 

Proper Implementation:

  • Ensure contrast ratio of at least 4.5:1 for small text

  • Ensure contrast ratio of at least 3:1 for large text (18pt/24px or 14pt/19px bold)

  • Consider both foreground and background colors, including transparency and opacity

  • Use color contrast analyzer tools to verify compliance

 

Examples of Correct Usage:

  1. Dark text on a light background (e.g., black text on white background)

Image
  1. Light text on a dark background (e.g., white text on navy blue background)

Image
  1. Sufficiently contrasting colors for text and background in buttons and other UI elements

Image

 

Common Errors to Avoid:

  1. Using low-contrast color combinations (e.g., light gray text on a white background)

Image
  1. Ignoring transparency/opacity in foreground colors

Image
  1. Overlooking text in images or complex backgrounds

Image
  1. Neglecting contrast in hover or focus states

Image

 

Rationale:

  • Improves readability for users with low vision

  • Enhances usability for individuals with color blindness

  • Helps all users distinguish text from backgrounds, especially in varying lighting conditions

 

Evaluation Method:

  • Automated checks for contrast ratios of all text elements

  • Considers disabled buttons and ignores elements with background images

  • Manual review required for elements with 1:1 ratio or complex backgrounds

  • Use of color contrast analysis tools for verification

Note: This rule does not report on text elements with background images, those obscured by other elements, or images of text. These may require additional manual evaluation.

Did you find this article helpful?
Previous

Implement clear link names

Next