Skip to content

Color Contrast Checker (WCAG AA & AAA)

Check the contrast ratio between text and background colors against WCAG 2 AA and AAA for normal text, large text and UI components, with a live preview and one-click suggestions for passing colors.

—
Contrast ratio
  • Normal text · AA (4.5:1)
  • Normal text · AAA (7:1)
  • Large text · AA (3:1)
  • Large text · AAA (4.5:1)
  • UI components & icons (3:1)

Large heading text

Normal body text. The quick brown fox jumps over the lazy dog. Good contrast keeps your content readable in bright sunlight and for people with low vision.

Small print, captions and footnotes need contrast too.

Button Link text

How to check color contrast

  1. Enter your text color and background color as HEX, RGB, HSL or a color name, or pick them with the color wells.
  2. Read the contrast ratio and the pass/fail results for each WCAG level.
  3. If a pair fails, click one of the suggested colors. The checker keeps the hue of your text color and only changes its lightness until the pair passes.

WCAG contrast requirements

  • AA, normal text: at least 4.5:1. This is the level most accessibility laws and audits refer to.
  • AA, large text: at least 3:1. Large means 24px (18pt) and up, or 18.66px (14pt) bold and up.
  • AAA, normal text: at least 7:1, and 4.5:1 for large text.
  • UI components and graphics: icons, input borders and focus indicators need at least 3:1 against their surroundings.

The ratio is calculated with the WCAG 2 relative luminance formula and is rounded down, so a pair shown as 4.50:1 really meets the 4.5:1 threshold. Semi-transparent text colors are blended over the background before measuring.

Tips

  • Gray text on white is the most common failure: #767676 is the lightest gray that still passes AA on pure white.
  • Check every state: placeholder text, disabled buttons, links and hover colors.
  • Use Swap to test light text on a dark background, for example on a filled button.

Build accessible color scales with the tints & shades generator; each swatch there already shows its contrast with white text.

More color tools