Contrast Checker

Pick a text colour and a background. You see the ratio, a live preview, a pass or fail for every WCAG 2.x level, and the nearest text colours that would pass if yours does not.

Free, no sign-up. Everything runs in your browser.

Colours

HEX (3 or 6 digits), rgb() or hsl(). Typing takes priority over the picker.

Pick or type two colours.

How to

Check contrast in three steps

  1. Choose the two colours

    Pick the text colour and the background, or type HEX, rgb() or hsl() values.

  2. Read the checks

    The ratio and the table show which WCAG 2.x levels the pair passes, for normal text, large text and icons.

  3. Fix a failing pair

    If the pair fails, click one of the suggested colours. They keep the look of your text colour and only make it lighter or darker.

Using the result

  • Normal text needs 4.5:1 for AA and 7:1 for AAA. Large text, which WCAG defines as at least 24 pixels or 18.66 pixels bold, needs 3:1 and 4.5:1.
  • Icons, chart lines and the borders of form fields need 3:1 against what is next to them.
  • Light grey text on white is the most common failure. The suggestions show how much darker it needs to be.
  • Text over a photo or gradient changes colour under the letters: test the lightest and darkest spots behind the text.

FAQ

Contrast checker questions

What contrast ratio do I need?

For WCAG 2.x level AA, normal text needs at least 4.5:1 and large text 3:1. For AAA the figures are 7:1 and 4.5:1. User interface parts such as icons and input borders need 3:1.

What counts as large text?

WCAG defines it as at least 18 point (24 pixels), or at least 14 point (about 18.66 pixels) and bold.

Why does a ratio of 4.5 show as a fail?

The tool compares the exact value. A pair at 4.496 is below 4.5 even though it rounds to it, so it shows 4.49 and fails.

How are the suggested colours chosen?

The tool keeps the hue and strength of your text colour and moves only its lightness, towards lighter or darker, until the ratio reaches the target. It offers the nearest one that passes.

Does a pass mean my design is accessible?

No. Contrast is one part of accessibility. This tool checks two colours only, not font size, spacing, images or how the page works with a keyboard or screen reader.

Is anything sent to a server?

No. The colours are checked in your browser. A share link only puts the two colour values in the address.