Free tools

Color contrast checker (WCAG 2.2)

Check text and background colors against the WCAG 2.2 contrast levels. Test one pair, or paste a whole list. If a pair fails, you get the closest color that passes.

Runs in your browser. Nothing is sent to our servers.

Contrast ratio 6.34 to 1. Normal text AA passes. Large text AA passes. AAA normal text fails.

Check one color pair

6.34 : 1

Contrast ratio of #0b6b66 on #ffffff. Shown cut to two decimals, never rounded up.

Large sample textNormal sample: the quick brown fox
Contrast results by WCAG level
What it coversNeedsWCAGResult
Normal text, AA4.5 : 11.4.3Pass
Large text, AA3 : 11.4.3Pass
Normal text, AAA7 : 11.4.6Fail
Large text, AAA4.5 : 11.4.6Pass
Interface parts and graphics3 : 11.4.11Pass

Large text means 24 px (18 pt) or bigger, or 18.66 px (14 pt) or bigger in bold. Text on images, gradients and hover or focus states needs separate checks.

Closest colors that pass

Hue and saturation are kept and only the lightness moves, so the suggestion stays close to your color.

Suggested replacement colors
To reachChange the text color toOr change the background to
7 : 1normal text (AAA)#0a635e7.09 : 1No color works

Check many pairs at once

5 pairs checked: 4 pass AA for normal text, 1 fail.

5 pairs checked: 4 pass AA for normal text, 1 fail.

Contrast results for each pasted pair
PairRatioAA textAA largeAAA textUI 3:1Closest text color for AA
Body text#0f2230 on #f7f8f615.25 : 1PassPassPassPassAlready passes
Link#0b6b66 on #f7f8f65.95 : 1PassPassFailPassAlready passes
Muted text#4b5b66 on #ffffff7.02 : 1PassPassPassPassAlready passes
Placeholder#9aa5ad on #ffffff2.51 : 1FailFailFailFail#6a7883
Button#ffffff on #0b6b666.34 : 1PassPassFailPassAlready passes

What next?

Wondering how many colors across a whole site fall short? This tool looks at one thing at a time. It cannot tell you whether a whole website meets a standard or a law.

How it works

  1. Each color is turned into red, green and blue values, then into relative luminance, the brightness measure defined in WCAG.
  2. The contrast ratio is (lighter + 0.05) divided by (darker + 0.05). It runs from 1:1 for identical colors to 21:1 for black on white.
  3. The ratio is compared with the WCAG levels: 4.5:1 for normal text and 3:1 for large text at AA, 7:1 and 4.5:1 at AAA, and 3:1 for interface parts and graphics.
  4. For a failing pair, the tool keeps the hue and saturation and moves the lightness in small steps, both lighter and darker, until the ratio is reached. It then checks the new color with the same formula before showing it.
  5. Everything runs in your browser. The colors you type are not stored or sent anywhere. Copy share link puts the two colors, and nothing else, into the web address so you can send a result to someone.

Questions

What contrast ratio do I need for WCAG AA?

Normal text needs at least 4.5:1 and large text at least 3:1 (success criterion 1.4.3). User interface components and graphics that carry meaning need 3:1 (1.4.11). AAA asks for 7:1 for normal text and 4.5:1 for large text (1.4.6).

What counts as large text?

Text that is at least 24 CSS pixels (18 point), or at least 18.66 pixels (14 point) and bold.

Does a pass here mean my page is accessible?

No. It means this one pair reaches the ratio. Text over images or gradients, hover and focus states, disabled controls and many other things need their own checks, and so do the many other parts of WCAG.

Why is 4.499 shown as 4.49 and not 4.5?

WCAG does not allow rounding up. A ratio just below the limit fails, so the tool cuts the number to two decimals instead of rounding it.

Does it work with transparent colors?

In a simple way. A see-through text color is laid over the background, and a see-through background is laid over white, before the ratio is worked out. For anything more complex, test the color you actually see on screen.

More free tools