Skip to content
UseQR

Design

Choosing QR code colours that scan

Decoders threshold on luminance, not hue, so the rule is a luminance difference of at least 40% between modules and background, dark on light. Apply the brand colour to the modules and keep the background white — colouring the background is where most branded codes fail.

Luminance is the only thing that matters

A decoder converts to greyscale before deciding dark from light. Relative luminance weights green heavily and blue almost not at all:

L = 0.2126·R + 0.7152·G + 0.0722·B

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

Working thresholds

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

Measured on screen these are the best case. Printing, laminating, dim lighting and an angled camera all consume margin, so leave headroom.

The rules

  1. Dark modules, light background. Inverted codes are supported inconsistently, for no design benefit.
  2. Never yellow, cyan, light green or pale orange for the modules.
  3. Brand colour on the modules, white behind. Maximises contrast while staying recognisably yours. If the brand colour is too light, use a darkened variant — a slightly darker blue that scans everywhere beats the exact swatch that does not.
  4. Gradients: the darkest and lightest points of the gradient must both satisfy the contrast rule, not just the average.
  5. No photographic backgrounds. Contrast varies across the code and the decoder has no single threshold to find.
  6. In print, specify 100% K unless you have measured the alternative in the final colour space. Brand colours frequently convert badly to CMYK.

Finder patterns deserve extra care

The three corners are how the scanner finds the code at all, before any error correction applies. Give them the highest contrast in the design, and do not tint them differently from the rest.

Verify, do not argue

Our validator computes the actual luminance contrast of your pair and decodes the rendered output. Showing a designer a number is faster than debating a swatch.

FAQ

Can a QR code be any colour?

The modules can be any colour dark enough to give at least a 40% luminance difference against the background. Hue is irrelevant; only luminance matters.

Why do yellow QR codes not work?

Yellow has very high relative luminance, so yellow modules are barely darker than a white background and the decoder cannot find a threshold.

Should I colour the modules or the background?

The modules, on a white background. Colouring the background reduces the luminance difference and is where most branded codes fail.

Can I use a gradient?

Yes, if both the lightest and darkest points of the gradient keep at least a 40% luminance difference against the background — not just the average.

Try it — free, no signup