Why won't my QR code scan? Contrast, colour and quiet zones

A QR code that looks fine on screen can be unreadable to a phone camera. Three things cause almost all of it, and all three are avoidable.

A scanner sees in black and white

A QR scanner does not see your colours. It thresholds the image into light and dark, then reads the pattern of dark squares against a light background. Anything that blurs the line between "dark" and "light" makes the code harder, or impossible, to read.

Cause one: not enough contrast

If the code colour and the background are too close in brightness, the scanner cannot reliably tell the modules from the gaps. Below roughly a 3:1 contrast ratio, phone cameras start to fail - and a design that pairs, say, mid-grey on light grey can look stylish and be unreadable.

Aim well above 3:1. Classic black on white is about 21:1 and scans from across a room; a tasteful dark-navy on cream is still fine; grey on grey is a gamble.

Cause two: inverted colours

QR codes expect dark modules on a light background. Reverse it - light modules on a dark background - and many scanners reject the code outright, because it violates the assumption they are built on.

This is the easiest way to produce a batch of good-looking codes that nobody can scan. If you want a dark theme, keep the modules darker than the background, not lighter.

Cause three: no quiet zone

A QR code needs a margin of empty space around it - the "quiet zone" - so the scanner can find its edges. The specification calls for four modules of clear space. Codes with the margin trimmed off often still scan on screen, where the surrounding page happens to be plain, and then fail once printed onto a busy background.

Do not crop a QR code tight to its edges, and do not place it over patterned artwork without a clear border.

Cause four: too little error correction for a logo or damage

A QR code isn't just a picture of data - it's built with redundant error-correction data baked in, so it can still be read even if part of it is dirty, scratched, or covered. The specification defines four levels, each trading code density for how much damage it can tolerate.

QR error-correction levels
LevelRecoverable if damaged/covered
L (Low)About 7%
M (Medium)About 15%
Q (Quartile)About 25%
H (High)About 30%

This is exactly why some logo-in-the-middle QR codes scan fine and others don't: a logo covering the centre is effectively deliberate damage, so it only stays reliably scannable at Q or H level. Generating the same code at L level with a logo on top removes more of the recoverable data than the code can tolerate, and it fails intermittently - working for some phones and lighting conditions, failing for others - which is often more confusing to diagnose than an outright failure.

Check before you print a thousand

The expensive failure is discovering the problem after the codes are on the flyers. Our bulk QR generator warns when the colours you have chosen fall below the contrast threshold, when the polarity is inverted, or when the quiet zone is too small - before you download the batch.

Where this comes from

  • Contrast, polarity and quiet-zone requirements are inherent to how QR (ISO/IEC 18004) scanners threshold and locate a code; the 3:1 practical contrast floor and 4-module quiet zone are the widely-applied working figures used in the tool.
  • The four Reed-Solomon error-correction levels (L/M/Q/H, approximately 7%/15%/25%/30% recoverable) are defined in the QR code specification, ISO/IEC 18004.