Skip to main content

Color Contrast

UI Design

What is Color Contrast

Color contrast is the difference in brightness between two colors, such as text and its background. It is measured as a contrast ratio, from 1:1 (no contrast) to 21:1 (black on white).

WCAG Color Contrast requirements

  • Normal text: At least 4.5:1 (level AA)
  • Large text: At least 3:1, for 18 pt or 14 pt bold text
  • UI components and graphics: At least 3:1 for borders, icons and states
  • Enhanced (AAA): 7:1 for normal text

How to check Color Contrast

Use a contrast checker in Figma or the browser and test every text and background pair, including hover, focus and error states. Check both light and dark themes. Never use color as the only signal; add text or an icon too.

Why Color Contrast matters

Low contrast makes text hard to read for people with low vision and for everyone in bright sunlight.

Frequently asked questions

What color contrast ratio does WCAG require for text?

Level AA asks for at least 4.5:1 for normal text and 3:1 for large text. Level AAA asks for 7:1 for normal text and 4.5:1 for large text.

Do buttons and icons need color contrast too?

Yes. WCAG 1.4.11 asks for at least 3:1 contrast for the visual parts that identify a control and its state, such as a button border or a checkbox outline, and for meaningful icons and charts.

What counts as large text in WCAG?

Text that is at least 18 point, or at least 14 point and bold. W3C notes these are roughly 24 px and 18.5 px on the web.