Colour and Contrast in QR Codes: What Still Scans
How to add colour to a QR code without breaking it, and the colour choices that cause scanning failures.
A black-and-white code is the safest, but colour can match a brand or a design. The key is contrast.
Why contrast matters
A scanner works by telling dark modules from light ones. If the two look too similar in brightness, it cannot decide which is which.
Safe choices
- Black on white, the classic
- Dark blue or dark green on white
- Dark brown on a cream background
- Any very dark colour on a very light one
Risky choices
- Yellow, pale pink or light grey modules on white
- Two mid-tones with similar brightness, such as orange on red
- Busy photo backgrounds behind the code
Inverted codes
A code with light modules on a dark background is called inverted. Some scanners read these, and some do not. If you use one, test it on several phones.
Gradients
A gradient that moves from dark to slightly lighter can work, as long as the lightest part is still clearly darker than the background.
A quick test
Take a photo of your code and turn it into black and white in an editing app. If the pattern is still easy to see, the contrast is probably good.
Colour and meaning
Do not rely on colour to tell people what the code does. Add a short label near it.
Tips
- Choose dark on light.
- Avoid similar tones.
- Test on more than one phone.
QR Code Scanner opens straight to the camera, which makes testing a coloured code quick.
Scan and create QR codes and barcodes with QR Code Scanner →
QR Code Scanner
Fast QR & barcode scanner with a built-in QR code generator
More about QR Code Scanner
Adding a Logo to a QR Code Safely
How designers place a logo inside a QR code by using error correction, and the limits that keep it scannable.
Read article →How Big Should a QR Code Be? Size and Scanning Distance
A simple rule of thumb for QR code size at different scanning distances, with tips for posters, cards and packaging.
Read article →Static and Dynamic QR Codes Explained
What is the difference between a QR code that stores its content directly and one that points to a redirect? A plain explanation.
Read article →The Quiet Zone and Other Printing Rules for QR Codes
Practical rules for printing QR codes that scan reliably: the quiet zone, contrast, flat surfaces and what to avoid.
Read article →