Color · Glossary

What is a contrast ratio?

Contrast ratio: A number from 1:1 to 21:1 that measures how different two colors are in brightness, used by WCAG to check that text is readable.

WCAG calculates the ratio from the relative luminance of the lighter and darker color: (lighter + 0.05) ÷ (darker + 0.05). Black on white is 21:1; the same color on itself is 1:1.

For level AA, normal text needs at least 4.5:1 and large text (24 px, or about 18.7 px bold) needs 3:1. Level AAA raises those to 7:1 and 4.5:1. Icons, input borders and other interface parts need 3:1 against their surroundings.

Example

Gray #767676 on white is about 4.54:1, just enough for AA; #777777 is about 4.48:1 and fails.

Contrast ratio: A number from 1:1 to 21:1 that measures how different two colors are in brightness, used by WCAG to check that text is readable.

Useful on edits.io

Feedback that points at the exact spot

edits.io lets clients pin comments on images, PDFs, videos and web pages. Free for 10 projects; reviewers never need an account.

Create a free account