Guide

What is color contrast ratio?

Contrast ratio measures how distinct two colors are in brightness. Here is how it’s calculated and what to aim for.

The scale

Contrast ratio runs from 1:1 (identical) to 21:1 (black on white). Higher is easier to read.

How it’s measured

It compares the relative luminance of two colors using the WCAG formula, then divides the lighter value by the darker one (plus a small offset). Hue doesn’t matter — only brightness.

What to aim for

Measure any pairing with the contrast checker.

Frequently asked questions

What is a good contrast ratio?

At least 4.5:1 for body text and 3:1 for large text and UI under WCAG AA. Aim for 7:1 where you can.

Does contrast depend on hue?

No — contrast ratio is based on relative luminance (brightness), not hue. Two colors with similar brightness will have low contrast regardless of hue.