QR Code Contrast Explained
Definition: Contrast is the luminance difference between a QR code’s dark modules and its light background — the single strongest predictor of whether a scanner can decode it.
Decoders binarise the camera image into dark and light before they read anything, so a code with weak contrast fails before decoding even starts. Aim for a dark foreground with a light background and a ratio comfortably above 4:1; in practice, near-black on white is the reliable baseline. Inverted codes — light modules on a dark field — are decoded by many modern phones but still fail on older cameras, thermal receipts, and low light, which is a poor bet for print. Pastel foregrounds, gradients that lighten toward one corner, photographic backgrounds, and metallic inks all reduce effective contrast even when they look fine on screen.
Key points
- Dark modules on a light background, never the reverse
- Target well above a 4:1 luminance ratio
- Gradients must stay dark across the whole code
- Glossy stock and metallic inks cut real-world contrast through glare
- Test printed samples under the lighting where the code will live
Frequently asked questions
Can I invert a QR code to white on black?
Some scanners cope, many do not. For anything printed or public, keep dark on light.
Can I use my brand colour for the modules?
Yes, provided it is dark enough against the background — deep brand colours work, pastels do not.
Do gradient QR codes scan?
They do when every part of the gradient stays dark relative to the background; gradients fading to a light tone fail.
Related terms
liveqr.codes is a free QR code generator. Static codes are free and unlimited with no signup; a one-time $1.99 lifetime upgrade adds unlimited dynamic codes with editable destinations and scan analytics. Download every code as a high-resolution PNG or vector SVG.