Skip to content
UseQR

Troubleshooting

QR code colours not scanning

Decoders convert the image to greyscale before deciding dark from light, so what matters is luminance difference, not how different the colours look. Two visually distinct colours can have nearly identical luminance and produce a code no scanner reads.

Luminance, not hue

A mid-tone red on a mid-tone green looks strongly contrasting to a human and is nearly identical in luminance. After greyscale conversion the decoder sees two similar greys and cannot place a threshold.

Relative luminance weights green heavily, red moderately and blue very little:

L = 0.2126·R + 0.7152·G + 0.0722·B   (on linearised channels)

That is why dark blue on black fails badly (blue contributes almost nothing) and why yellow modules almost never work (yellow is very bright).

Working thresholds

Luminance difference Result
Above 60% Reliable in most conditions
40–60% Works in good light; marginal in dim rooms
30–40% Fails on many cameras
Below 30% Effectively unreadable

Measured on screen these are best case. Printing, laminating, dim lighting and an angled camera all reduce effective contrast, so leave headroom.

Rules that hold

  1. Dark modules, light background. Inverted codes are supported inconsistently.
  2. Never yellow, light green, cyan or pale orange for the modules. All are too bright.
  3. Avoid dark blue on black and other low-luminance pairs that look contrasting.
  4. Gradients must keep the darkest and lightest points within the contrast rule, not just the average.
  5. Photographic backgrounds almost never work, because contrast varies across the code.

The safe way to use brand colour

Use the brand colour for the modules, on a white background — that maximises the luminance difference while keeping the code recognisably yours. Colouring the background instead is where most branded codes fail.

If the brand colour is too light, use a darkened variant for the code. A slightly darker brand blue that scans everywhere is better than the exact swatch that does not.

Check, do not guess

Our validator computes the real luminance contrast of your chosen pair and decodes the rendered output, so you get a number rather than an opinion.

FAQ

Why does my colourful QR code not scan even though the colours look very different?

Decoders work on luminance after greyscale conversion. Colours that contrast strongly in hue can have almost identical luminance, leaving the decoder no threshold to work with.

Can I use my brand colour in a QR code?

Usually, if you apply it to the modules and keep the background white. If the brand colour is light, use a darkened variant. Colouring the background is where most branded codes fail.

Why do yellow QR codes never work?

Yellow has very high relative luminance, so yellow modules are barely darker than a white background. There is no threshold for the decoder to find.

Can I invert a QR code — light modules on a dark background?

Some scanners handle it, many do not. There is no functional benefit, so it is a gamble taken for aesthetics alone.

Try it — free, no signup

  • QR code not scanning: the checklistWork through these in order, because they are ranked by how often they are the actual cause: quiet zone, contrast, size for distance, glare, blur from…