Free tool

QR code contrast checker

Pick a code color and a background color to see their contrast ratio and whether phones will read them. Aim for at least 4.5:1, with the code darker than the background. Below 3:1, many phones fail. If a pair is weak, the checker suggests a close color that passes.

#
#

Try an example

Sample QR code in your colors
Your colors
The same QR code in grayscale, roughly how a scanner sees it
In grayscale, roughly how a scanner sees it

How the check works

A scanner barely uses hue. To find the squares of a QR code, it looks at how bright each spot is and splits the picture into dark and light. Two colors can look nothing alike to you and still land on the same side of that split.

The checker measures the gap with the contrast ratio, the formula the web's accessibility guidelines (WCAG) use for text. It compares the relative brightness of the two colors, from 1:1 (identical) to 21:1 (pure black on pure white), and gives a verdict:

Contrast ratioVerdictWhat it means
7:1 or moreGreatScans easily, with room to spare for print
4.5:1 to 7:1GoodShould scan on any phone
3:1 to 4.5:1RiskyOften scans, but test it before you print
Under 3:1Too faintMany phones will fail

No standard sets a minimum contrast for QR codes, so these cut-offs are our own, and they match the warning in our generator. They lean cautious on purpose: a code that only just passes on screen can fail once printed. The grayscale preview shows roughly what the scanner works with once the color is gone.

Some pairs, measured

Ratios from the checker, including the examples you can click above:

Code on backgroundRatioVerdict
Near-black #0a0a0a on white19.8:1Great
Navy #1e3a5f on cream #fdf6e310.7:1Great
Brand blue #1d3fd6 on white7.7:1Great
Rose #e11d48 on white4.7:1Good, only just
Pure red #ff0000 on pure green #00ff002.9:1Too faint
Light gray #9ca3af on white2.5:1Too faint
Yellow #facc15 on white1.5:1Too faint
Blue #0000ff on purple #8000801.1:1Too faint

Red on green and blue on purple are the surprises: the hues couldn't be more different, and the brightness is almost the same.

Color pairs that catch people out

  • Yellow, light green, pink or pale blue codes on white. They look clear to you but sit close to white in brightness. For the yellow above, the checker's fix is #8c720c, a dark olive, because that's how far yellow has to move to reach 4.5:1. Put the yellow in the frame around the code instead.
  • Brand colors in the middle range. Mid-range blues and reds on white often sit just either side of 4.5:1, like the rose above. Use the darkest shade of your brand color for the code.
  • Gradients. If one end of a gradient is light, those squares can disappear. Check the lightest color in it.
  • Transparent backgrounds. The code's contrast then depends on whatever it's printed on. Use one only on a surface you know is plain and light, and check that surface's color here.

When a pair fails, the checker darkens the code color (or lightens the background) just enough to reach 4.5:1, so the result stays as close to your color as it can.

Light codes on dark backgrounds

The checker flags inverted codes, where the code is lighter than its background, even when the ratio is high. White on near-black is 18.9:1, and some phones and scanner apps still won't read it. If everyone has to be able to scan your code, keep it dark on light. If you invert it for style, test it on several phones, including an older one.

The screen is the best case. Ink on uncoated paper looks lighter, glossy finishes reflect light, and dim rooms flatten everything. For anything printed, choose a pair comfortably above 4.5:1 and print one test copy before the full run. The guide to QR code colors and contrast goes deeper, the size calculator tells you how big to print, and why is my QR code not working? covers the other causes.

Once the colors pass, the button under the checker opens the generator with both colors already set.

Last updated