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
Barcode Scanning for Allergen and Ingredient Checks
How barcode and QR scans can help people with allergies and dietary needs find ingredient information — and why the printed label still matters.
Read article →Barcodes on Medicines: What They Contain
What barcodes and 2D codes on medicine packs are used for — identification, batch tracking and authenticity — and what scanning them can tell you.
Read article →QR Codes at Restaurants: Ordering, Menus and Paying Safely
How restaurant QR codes for menus, ordering and payment work, and simple checks to make sure you're scanning the restaurant's real code.
Read article →QR Codes in Emails and PDFs: Phishing Risks
Attackers increasingly hide phishing links inside QR codes in emails and documents. Learn how 'quishing' works and how to protect yourself.
Read article →