Approximately 300 million people worldwide have some form of colour vision deficiency. Many more have age-related vision reduction, low-contrast displays, or are viewing websites outdoors in bright sunlight. Colour contrast accessibility — and the WCAG guidelines that govern it — exists to ensure your content is readable by all of them.

This article explains what contrast ratio is, what the WCAG standards require, how to test your colours, and what to do when you fail.

What Is Contrast Ratio?

Contrast ratio is a number that describes how much difference in luminance (perceived brightness) exists between two colours. It's expressed as a ratio like 4.5:1 or 7:1.

The ratio is calculated from the relative luminance of each colour, a value derived from the RGB components that accounts for how the human eye perceives different wavelengths of light. You don't need to calculate this manually — tools like our Contrast Checker do it instantly.

PASS AA

Dark text on white background. Contrast ratio: ~18:1. Easy to read in all conditions.

FAIL

Light red text on light background. Contrast ratio: ~2:1. Difficult to read for most users.

The WCAG Standards: AA vs AAA

The Web Content Accessibility Guidelines (WCAG) are published by the W3C and define the internationally accepted accessibility standards for the web. WCAG 2.1 defines two levels of contrast compliance:

LevelNormal TextLarge TextUI Components
AA (minimum)4.5:13:13:1
AAA (enhanced)7:14.5:14.5:1

Normal text means body copy under 18pt (24px) or bold text under 14pt (18.67px bold). Large text is anything above those thresholds. UI components covers graphical elements like form inputs, icons, and focus indicators.

Legal note: In many countries, public sector websites are legally required to meet WCAG 2.1 AA. The EU Web Accessibility Directive and the US Section 508 both mandate this. Private sector websites are increasingly facing enforcement too, particularly in the US under ADA Title III.

How to Test Contrast

There are several ways to check colour contrast:

Check your colours now

Free WCAG AA and AAA contrast ratio checker — no sign-up needed.

Open Contrast Checker

What to Do When You Fail

If your text fails contrast, you have a few options:

Common Failing Combinations

These are the most frequently seen contrast failures in real-world websites:

Beyond the Ratio: Real-World Accessibility

Contrast ratio is a necessary but not sufficient condition for accessible design. Other factors that affect readability:

Passing WCAG AA is the floor, not the ceiling. Aim to design for the widest possible range of users rather than just meeting the minimum threshold.