Skip to content
useToolz online tools
WCAG Color Contrast: Website Accessibility Guide
Development

WCAG Color Contrast: Website Accessibility Guide

Александр Михеев

Александр Михеев

10 March 2025 · 4 min read

Color contrast is one of the most important accessibility parameters in web design. According to the WHO, over 2.2 billion people worldwide have vision impairments. Insufficient contrast between text and background makes content unreadable — not only for people with low vision, but for anyone using a screen in bright sunlight or on a poorly calibrated display.

The WCAG (Web Content Accessibility Guidelines) standard sets clear minimum contrast requirements. This guide covers how the calculation formula works, what compliance levels exist, and how to check contrast in practice.

What Is WCAG and Why It Matters

WCAG is a set of web content accessibility guidelines developed by the W3C (World Wide Web Consortium). The standard defines how to make websites usable for people with various disabilities: visual, auditory, motor, and cognitive impairments.

The current version is WCAG 2.1 (published in 2018). It includes three conformance levels: A (minimum), AA (recommended), and AAA (maximum). Most accessibility laws (ADA in the US, EN 301 549 in the EU) reference level AA as the required standard.

AA and AAA Contrast Levels

WCAG defines minimum contrast ratios based on text size and conformance level:

ElementLevel AALevel AAA
Normal text (up to 18px or up to 14px bold)≥ 4.5:1≥ 7:1
Large text (18px bold or 24px and above)≥ 3:1≥ 4.5:1
UI components (buttons, icons, input borders)≥ 3:1

Contrast Ratio Formula

The contrast ratio is calculated as:

CR = (L1 + 0.05) / (L2 + 0.05)

where L1 is the relative luminance of the lighter color and L2 is the darker color. The result ranges from 1:1 (no contrast) to 21:1 (maximum contrast, black on white).

In practice, you don't need to calculate this manually — use our contrast checker tool to instantly see the ratio and WCAG compliance level.

Good and Bad Contrast Examples

Color PairContrastWCAG AARating
Black (#000) on white (#FFF)21:1PassMaximum contrast
Dark gray (#333) on white (#FFF)12.6:1PassExcellent
Blue (#1D4ED8) on white (#FFF)7.8:1PassGood
Gray (#767676) on white (#FFF)4.5:1PassMinimum acceptable
Gray (#888) on white (#FFF)3.5:1FailHard to read
Light gray (#AAA) on white (#FFF)2.3:1FailNearly unreadable

How to Fix Low Contrast

  • Darken the text — the simplest approach. Use #555 or #333 instead of #888.
  • Lighten the background — if the background is dark, make it lighter or use pure white.
  • Increase font size — large text (≥ 18px bold) has softer requirements (3:1 instead of 4.5:1).
  • Find an alternative color — our contrast checker suggests the nearest colors that pass WCAG AA and AAA.

Frequently Asked Questions

What is the minimum contrast ratio for text?
WCAG 2.1 level AA requires at least 4.5:1 for normal text and 3:1 for large text (18px bold or 24px+). Level AAA requires 7:1 and 4.5:1 respectively.

Is WCAG compliance mandatory?
In many countries, yes. In the US — ADA and Section 508. In the EU — European Accessibility Act (from 2025). For commercial websites, WCAG compliance is a best practice that improves user experience and SEO.

How do I quickly check contrast?
Open our WCAG contrast checker, enter two colors (text and background), and instantly see the contrast ratio, AA/AAA compliance, and color suggestions.

Does contrast affect SEO?
Yes. Google considers accessibility in ranking (Core Web Vitals, Lighthouse Accessibility score). Sites with good contrast score higher in Lighthouse audits, which indirectly affects search positions.

What if my brand color fails WCAG?
Use the brand color for large elements (headings, buttons) where the threshold is lower (3:1). For body text, find a more contrasting shade from the same color family. Our tool automatically suggests the nearest passing color.

Conclusion

Contrast is not an abstract metric — it directly affects your website's usability. Check every text-background pair against WCAG 2.1, aim for at least AA, and target AAA for main content. Start with our WCAG contrast checker — it shows issues and suggests fixes in seconds.

Понравилась статья?

Оцените — это помогает нам делать контент лучше

Change rating

Your rating:

Thanks for your rating!

Comments

Log in to leave a comment

No comments yet. Be the first!

We use cookies for site operation and analytics. Подробнее

Upscaled image
Download

Log in to continue

or