Worst case, not a sample
A reader cannot choose which part of the background a word lands on. The lowest-contrast spot behind the text is where it becomes hard to read, so that is the number this leads with.
Draw a box around text on a photo, screenshot or gradient. Get the contrast at its worst spot, not at one clicked pixel.
Your image never leaves your device. It is opened and measured inside this browser tab; nothing is uploaded, stored or sent. How to check that for yourself.
Drop an image here
or press Enter to choose a file, or paste an image from your clipboard (Ctrl+V or ⌘V)
PNG, JPEG, WebP, GIF or AVIF, up to 25 megapixels
Drag a box around the text on the image, or type the box in as numbers below. Include some of the background around the letters: that is what gets measured.
Fill in all four and the measurement updates by itself. They follow the box you draw, and drawing follows them.
Click the middle of a thick part of a letter on the image. Keyboard users can type the colour or use the eyedropper instead.
The tool picked this colour itself. Compare it with the letters on the image: the result becomes a verdict only once the colour is yours.
| Part of the box | Left | Centre | Right |
|---|
Your box is read from the image. If it holds more than 1,000,000 pixels, the tool measures a regular grid of them instead, so large images stay quick: every Nth pixel in each direction, using the smallest N that keeps the grid within 1,000,000 points. For a whole 12-megapixel phone photo (4032 × 3024) that is every 4th pixel, and the result says which spacing it used. Nothing outside your box is read.
Unless you set it, the tool splits the box's pixels into the two colour groups that describe them best and takes the smaller group as the text, because letters usually cover less of a box than what is behind them. It also scores how clear that split is, and checks that neither group hides a third colour, such as a dark building beside a headline on a pale sky, which would make "the smaller group" meaningless. If it cannot tell the text from the background it says so and asks for the colour. When it can, the colour is still only a suggestion: the result is worded "if the text is …", with no pass or fail, until you confirm the colour with one button or set it yourself.
Pixels that match the text colour are the letters. The anti-aliased pixels along their edges are blends of text and background, so they are always lower in contrast than the background itself, and counting them would make every piece of text fail somewhere. They are set aside: pixels touching a letter, and blended pixels one step further out. A smooth stretch of background is never set aside just for looking like a blend, so the dark end of a gradient still counts. Thin lines, grids and fine texture are different: up close they look like the soft edge of a thin letter. The result says so and gives both figures instead of a plain pass when failing detail like that runs unbroken across the box and some of it has no letter near it, or when counting it as background would add more than 5 percentage points to the failing share. It does the same when an area of the text colour is too wide to be a letter.
Every remaining background pixel gets a WCAG contrast ratio against the text colour. You see the worst ratio, the 5th percentile, the median and the share of the background below your threshold. The verdict only says "passes everywhere" if every measured pixel passes, nothing set aside would change that, and the text colour is one you set or confirmed: a median that passes while a third of the box fails is not a pass.
| Text size | Level AA | Level AAA |
|---|---|---|
| Normal text | 4.5:1 | 7:1 |
| Large text | 3:1 | 4.5:1 |
These come from WCAG success criteria 1.4.3 Contrast (Minimum) and 1.4.6 Contrast (Enhanced). Large text is at least 18 point (24px), or at least 14 point (about 18.7px) and bold.
A reader cannot choose which part of the background a word lands on. The lowest-contrast spot behind the text is where it becomes hard to read, so that is the number this leads with.
A heat map on the image and a plain-text table show which part of the box fails, so you know what to move or darken. Neither relies on colour alone.
There is no upload, no account and no server doing the maths, so a screenshot of an unreleased design never goes anywhere.
No. The image is decoded and measured in this browser tab, and there is no server-side processing: the maths is in two script files you can read, image-contrast-ui.js and image-contrast.js. To check for yourself, open your browser's developer tools, switch to the Network tab and load an image. Apart from this page's own files and its web font when the page first opens, nothing is requested.
An average or a median can pass while a third of the box fails. The tool reports the worst ratio, the 5th percentile and the median, and the share of the background that fails your threshold, and it only says a box passes if every measured pixel does.
Because the detected colour is the tool's guess at which colour is the lettering, and a wrong guess gives a wrong answer that looks just as sure as a right one. In our own testing, white text on a sky fading from blue to pale, beside a dark building, was taken to be the colour of the building, and measured with that colour the box passed, although most of the background behind the real text failed. So until you press "Yes, the text is …", type the colour, pick it from the image or use the eyedropper, the result says "if the text is …" and gives no pass or fail.
Automatic detection assumes the box holds two main colours and that the smaller one is the text. A photo or a gradient is a smear of colours rather than two groups, a box that is half letters and half background has no clear minority, and a box that also catches a third colour, such as a building, a button or the page around a banner, has no single smaller group to pick. In those cases it asks you instead of offering a suggestion: click a letter on the image, type the colour, or use the eyedropper if your browser has one.
Common fixes are a solid or semi-transparent panel behind the text, darkening or lightening the part of the image behind it, moving the text to a calmer part of the image, or changing the text colour. Where one colour would pass against everything in your box, including anything it set aside and was unsure about, the result lists it. Text shadows and outlines are not modelled, so if you rely on one, judge the result by eye as well.
Screenshot or export the page or frame as an image and load it here. For the structure of a PDF, such as its tags and language, use our PDF accessibility checker.
For two flat colours, WebAIM's Contrast Checker is quick, and so is our own colour contrast checker. For contrast on a live page, WAVE, axe DevTools and the Silktide toolbar are free and good. TPGi's Colour Contrast Analyser is a free desktop contrast tool. In February 2026 its former maintainer posted a notice on GitHub that he no longer works at TPGi, has lost access to the repository and can no longer update it; the latest release is from September 2025.
Two flat colours in, WCAG ratio and pass or fail out. The right tool when the background is one solid colour.
Runs checks on any live page in your own browser, which is where real contrast on a real page has to be measured.
A structural check of a PDF, run in your browser. It looks at tags and structure, not colour.
Colour is only half of what an image does on a page. GotAlt's alt text checker downloads the actual image file and compares it to the words with a vision model.
Check if my alt text is actually rightThe free scan runs 16 rule-based WCAG checks on up to 3 pages of your site: missing alt text, form labels, headings, page language, link text and more. No signup.
Scan my site — free