Color contrast checker

Gray #5E5E66 text on white #FFFFFF has a contrast ratio of 6.42:1. It passes WCAG AA for all text, but not AAA for normal text (7:1).

6.42 : 1 Contrast ratio

  • AA normal text
  • AAA normal text
  • AA large text
  • AAA large text
  • UI components
  • APCA Lc 81.9

Color contrast checker

Palette matrix

Free·No sign-up·Works offline after the first visit

How to use

  1. 1

    1. Enter the text color and the background color, as HEX, RGB, HSL or a name, or pick them.

  2. 2

    2. Read the ratio and the five badges: AA and AAA for normal text, AA and AAA for large text, and UI components.

  3. 3

    3. If a badge fails, tap Fix it to get the nearest color in the same hue that passes.

Fix it keeps the hue and changes only the lightness, so your brand color still looks like itself. Example: for AAA, #5E5E66 becomes #585860 (7.05:1 on white).

Paste a palette to see every text and background pair at once, with its ratio and a pass or fail badge. Useful for deciding which colors can carry text.

levelnormal textlarge text (24px, or 18.66px bold)UI components and graphics
AA4.5:13:13:1
AAA7:14.5:1-

What contrast ratio you need

The Web Content Accessibility Guidelines (WCAG) measure contrast as a ratio from 1:1 (the same color) to 21:1 (black on white). Most accessibility laws and company policies ask for level AA: at least 4.5:1 for normal text and 3:1 for large text, icons, input borders and focus rings. Level AAA asks for 7:1 for normal text. The ratio is calculated from the relative luminance of the two colors, so it doesn't matter which one is the text and which the background: swap them and the ratio stays the same.

Some combinations surprise people. White text on a bright orange #FFA500 has only 1.97:1 and fails every level; white on pink, yellow, light green or sky blue fails too. Dark text usually works better on light, bright colors. The checker also shows an APCA value for information; APCA is a newer method that may come in a later WCAG version, but WCAG 2.2 is the standard today.

How to fix low contrast

Change lightness, not hue. Make the text darker or the background lighter until the ratio passes; Fix it does this in one tap and keeps the hue. If the brand color must stay as it is, use it for large headings, borders or backgrounds and set the body text in a darker neutral. Don't rely on color alone either: add an icon, an underline or a label, so people with a color vision difference get the message too. The color blindness simulator shows how your colors look to them.

Questions and answers

What is a good contrast ratio?

At least 4.5:1 for normal text and 3:1 for large text (WCAG AA). 7:1 meets AAA for normal text.

Is this checker the same as the WebAIM contrast checker?

It uses the same WCAG 2.2 formula and levels, and adds a Fix it button and a palette matrix.

What color has good contrast with pink?

Dark colors: navy #000080, charcoal #36454F or black. White text on light pink fails.

What color contrasts with green?

For text, white on dark green #008000 (5.14:1) or black on light green. For design, the opposite on the wheel: red or magenta.

Does purple have good contrast with white?

Dark purple #800080 on white has 9.42:1 and passes AAA. Light purples such as lavender need dark text.