DailyDeskTools home

Color Contrast Checker (WCAG)

Check text and background colors against WCAG AA and AAA, and get passing color suggestions.

  • Free forever
  • No signup
  • Runs on your device
Contrast CheckerRuns locally · nothing uploaded
Loading tool…

How to use the Contrast Checker

  1. 1Enter or pick the text color and the background color.
  2. 2Read the contrast ratio and the pass or fail result for each WCAG level.
  3. 3Check the live preview to see how text and buttons look.
  4. 4If a check fails, use one of the suggested colors. It keeps your hue and adjusts only the lightness.

What contrast ratio means

Contrast ratio compares the brightness of two colors, from 1:1 (identical) to 21:1 (black on white). It is calculated from each color's relative luminance, using the formula in the Web Content Accessibility Guidelines (WCAG).

WCAG requirements

  • AA, normal text: at least 4.5:1. This is the level most laws and accessibility policies refer to.
  • AA, large text: at least 3:1. Large means about 24px regular or 19px bold and above.
  • AAA, normal text: at least 7:1.
  • AAA, large text: at least 4.5:1.
  • UI components and icons: at least 3:1 against what surrounds them.

Why it matters

Low contrast is one of the most common accessibility problems on the web. Good contrast helps people with low vision or color blindness, older readers, and anyone using a phone in bright sunlight.

Fixing a failing color

The suggestions keep your text color's hue and step its lightness up or down until it passes, so your design keeps its character. Light grey placeholder text and pale brand colors on white are the usual culprits.

Examples with real ratios

Text on background Ratio Result
#000000 on #FFFFFF 21:1 Passes AA and AAA
#767676 on #FFFFFF 4.54:1 Passes AA for normal text, fails AAA
#777777 on #FFFFFF 4.48:1 Fails AA for normal text
#FFFFFF on #0F766E 5.47:1 Passes AA for normal text
#FFFFFF on #3B82F6 3.68:1 Passes only for large text and UI parts
#FFFFFF on #F59E0B 2.15:1 Fails everything

The ratio runs from 1:1 (identical colors) to 21:1 (black on white). It compares the relative luminance of the lighter and darker color: (L1 + 0.05) ÷ (L2 + 0.05). The thresholds come from WCAG 2.2, success criteria 1.4.3 and 1.4.6 for text and 1.4.11 for interface components.

Cases the number does not settle

  • Text over a gradient or photo: test the lowest-contrast area, since the ratio only compares two flat colors.
  • Placeholder text, hover states and focus rings count. Disabled controls are exempt under WCAG, but keep them distinguishable.
  • Thin light fonts can look weaker than the ratio suggests. Treat a borderline pass as a prompt to darken.

Fixing a failing pair

Change lightness first and keep the hue, as the suggestions do. If your brand color fails, build a darker shade in the color palette generator. Use the HEX to RGB converter to get the format your stylesheet needs, and check text laid on a CSS gradient at both ends.

Frequently asked questions

What contrast ratio do I need?

4.5:1 for normal text and 3:1 for large text to meet WCAG AA, the level most organisations aim for.

Does contrast apply to logos?

No. WCAG exempts logos and brand names, and decorative elements. It does apply to text, icons and form controls.

Why does my color fail even though it looks readable?

Displays and eyesight vary. The ratio is a consistent, measurable standard that accounts for a wide range of viewers and screens.

What counts as large text in WCAG?

Text at 18 point (24 px) or larger, or 14 point (about 18.7 px) or larger if bold. Large text needs 3:1 for AA instead of 4.5:1.

Is a 4.5:1 ratio the same as AA?

For normal-size text, yes: 4.5:1 is the minimum for WCAG AA. AAA asks for 7:1.

Last updated · By the DailyDeskTools team

Built and written with AI assistance, then tested by hand by our team. How we make our tools