Skip to content
BENIBIX Learn

Contrast Ratio

Design♿ AccessibilityVision and Motion

Also known as Color Contrast Ratio, Colour Contrast, Text Contrast

A number that says how much text stands out from its background.

Think of it like

It is like chalk on a board. White chalk on black is easy to read. Grey chalk is not.

Example

Lucy's light grey text on white scores 2.3 to 1. She makes it darker until it passes 4.5 to 1.

Why it matters

Low contrast is one of the most common blocks on the web. It also hurts anyone who reads in bright sun.

Formula

ratio = (L1 + 0.05) ÷ (L2 + 0.05)

Definition

A contrast ratio is a number that says how much lighter one color is than another, from 1 to 1 up to 21 to 1. Black on white is 21 to 1, and two of the same color is 1 to 1. WCAG asks for at least 4.5 to 1 for normal text and 3 to 1 for large text. Icons and the edges of controls need 3 to 1 too. Free checkers give the number in a second.
Where the WCAG lines sit on the contrast scale.

Common mistake

Pale grey text because it looks calm. Calm is no use if people cannot read it.

Key takeaways

  1. 1
    4.5 to 1 for text. 3 to 1 if large.
  2. 2
    3 to 1 for icons. And control edges.
  3. 3
    Check, do not guess. Use a checker.