Skip to content

Color Contrast Checker

A color contrast checker for WCAG 2.2: see the ratio and AA and AAA results, get the nearest colours that pass, and test text over a thumbnail or photo.

  • Runs in your browser
  • Pictures never leave your device
  • Free, no sign-up
Hex (#1f2937), rgb(), hsl() or a colour name. Add transparency with rgba() or 8-digit hex.

Contrast ratio

–

WCAG 2.2 results

WhatNeedsResult

Preview

Normal text at 16 px: the quick brown fox jumps over the lazy dog.

Large text at 24 px

Bold text at 18.5 px

Button Input border

Text over a picture

Check text on a thumbnail, banner or slide: choose the picture and the area where the text sits. WCAG's quick check compares the text with the part of that area most like it.

Drop a picture here, or click to choose JPEG, PNG, WebP, GIF or AVIF · it never leaves your device

How to check color contrast in 4 steps

  1. Enter the text colour and the background colour. Type a hex code (#1f2937), rgb(), hsl() or a colour name, or use the colour picker. Transparent colours work too.
  2. Choose what must pass: normal or large text at AA or AAA, or 3:1 for icons, borders and graphics.
  3. Read the ratio and the five results. If it fails, the tool lists the nearest text and background colours that pass, darker and lighter, each with a Use button.
  4. Check text on a picture, if you need to. Add a thumbnail, banner or slide and choose where the text sits. The tool runs WCAG's quick check for that area and tells you what overlay would fix it.

Grey #777777 text on white at 4.47:1: it fails AA for normal text and passes for large text, with the five WCAG 2.2 results, a preview and the nearest passing colours, #767676 first

WCAG 2.2 contrast levels at a glance

What AA AAA
Normal text 4.5:1 7:1
Large text (24 px, or 18.5 px bold) 3:1 4.5:1
Icons, input borders and the parts of graphics people need 3:1 none

Large text is at least 18 point, or 14 point bold, which WCAG puts at about 24 px and 18.5 px on the web. Text in a logo, purely decorative text and text on disabled controls have no contrast requirement.

What makes this contrast checker different

  • It suggests the fix. When a pair fails, you get the nearest passing colours for the text and for the background, darker and lighter. They keep the hue and change only what's needed: #777777 on white becomes #767676, one shade darker.
  • It checks text over a picture. Thumbnails, banners and slides put text on photos, where one colour pair can't tell you much. The tool follows WCAG's own quick check for text on images (the darkest part of the area for dark text, the lightest for light text). It shows how much of the area passes and which overlay, in 1% steps, makes all of it pass.
  • It never rounds up. WCAG says 4.499:1 does not meet 4.5:1, so ratios are cut to two decimals: 4.499 shows as 4.49 and fails.
  • Any colour format. Hex with 3, 4, 6 or 8 digits, rgb() and hsl() in old and new syntax, colour names, and transparency. A see-through colour is checked as it actually shows.
  • Private. Pictures are measured in your browser and never uploaded.

Use cases

  • Designers and developers checking brand colours, buttons and form borders before a release.
  • YouTubers and social media managers checking that a title on a thumbnail stays readable, and how dark an overlay needs to be.
  • Writers and teachers making slides and documents that people with low vision can read.
  • Anyone fixing an audit result: paste the two colours from the report and use the nearest passing colour.

Specs and limits

  • Colour input: hex (#rgb, #rgba, #rrggbb, #rrggbbaa), rgb() and rgba(), hsl() and hsla(), and colour names your browser knows. Other formats (lab(), oklch()) aren't read yet.
  • Transparency: see-through text is checked as it shows on the background; a see-through background as it shows on a white page.
  • Pictures: JPEG, PNG, WebP, GIF and AVIF, up to 16,384 pixels a side. The picture is kept at up to 1,600 pixels a side, and the chosen area is averaged into at most 160 × 160 blocks before it's checked.
  • Share link: "Copy link" puts the two colours and the level in the link. Nothing else is in it.
  • Saved in this browser: only your two colours and the level, so they're there next time. Pictures are never saved.
  • What a picture check can't tell you: if the quick check fails, WCAG goes on to check the background behind each letter, which needs the real text in place. An overlay or a text colour that passes the quick check avoids that question.

Methodology

  • Ratio: relative luminance and contrast ratio exactly as WCAG 2.2 defines them: (L1 + 0.05) / (L2 + 0.05), using the sRGB formula with the 0.04045 threshold. This is the same formula as the Dizwa checker this tool replaces.
  • Pass or fail: the unrounded ratio is compared with each threshold. The ratio shown is cut, never rounded up, to two decimals.
  • Transparency: colours are mixed the way a browser shows them, then rounded to whole sRGB values.
  • Suggestions: the colour is moved in small lightness steps in the OKLCH colour space, keeping its hue, and its chroma is reduced only when sRGB can't show it. The first colour that passes after rounding to hex is kept, in each direction. The list is sorted by how much the colour changes.
  • Pictures: the area is averaged into blocks, so single noisy pixels don't decide the result. The weakest block against your text is the quick-check ratio. Each overlay is tested at every whole percent until every block passes.

Sources

Checked on 30 November 2026.

Frequently asked questions

What contrast ratio do I need?

For WCAG 2.2 level AA, normal text needs at least 4.5:1 and large text 3:1. Level AAA asks for 7:1 and 4.5:1. Icons, input borders and the parts of graphics people need to understand need 3:1 (AA).

What counts as large text?

WCAG defines it as at least 18 point, or 14 point bold. On the web that's about 24 px, or 18.5 px bold.

Why does 4.49:1 fail when it's so close to 4.5?

WCAG says the ratio must not be rounded up, so 4.499:1 does not meet 4.5:1. This tool cuts the ratio to two decimals instead of rounding, so what you see matches the result.

How are the suggested colours chosen?

The tool keeps your colour's hue and makes it darker or lighter in small steps until it reaches the ratio you chose, for the text and for the background. Each suggestion is checked again after rounding to a hex code, so it really passes.

How do I check text on a picture?

Add the picture and choose where the text sits, or drag over it. WCAG's quick check for text on images compares the text with the part of the area most like it: the darkest part for dark text, the lightest for light text. The tool shows that ratio and the overlay needed if it fails.

Is my picture uploaded?

No. The picture is opened and measured in your browser and never leaves your device. Only your two colours and the level you chose are remembered in this browser.

Can I use transparent colours?

Yes. A see-through text colour is checked as it shows on the background, and a see-through background as it shows on a white page. The tool tells you the solid colour it used.

Does it use APCA?

No. It uses the contrast ratio defined in WCAG 2.2, the current W3C standard, so the results match what accessibility audits check. APCA is a different method that isn't part of WCAG 2.2, and its scores aren't comparable with this ratio.

Last updated · Checked in Chrome's engine (Chromium 156) on 1 December 2026. Not yet checked in Safari, Firefox or on phones. · By the VidzHome team