QR Code Colors
QR codes can use almost any color — but the wrong combination will make them unscannable. Here's the contrast rule, safe combinations, and what to avoid.
The fundamental rule: contrast ratio
QR code scanners detect the difference between dark modules and a light background. The greater the contrast, the more reliably the code scans across different devices, lighting conditions, and print qualities.
The ISO 18004 standard specifies 4:1 minimum. For real-world reliability across all devices and lighting, 4.5:1 (WCAG AA) is recommended. Standard black on white achieves 21:1.
Safe and unsafe color combinations
- ✓Black modules on white background (21:1)
- ✓Dark navy on white (15:1+)
- ✓Dark green on white (7:1+)
- ✓Dark purple on white (9:1+)
- ✓Dark brown on cream (5:1+)
- ✓Dark grey on light grey (4.5:1+)
- ✗Red on white (4.5:1 — borderline, fails on some devices)
- ✗Yellow on white (1.07:1 — nearly invisible)
- ✗Light blue on white (insufficient contrast)
- ✗White on black (inverted — many scanners fail)
- ✗Gradient from dark to light (inconsistent contrast)
- ✗Similar lightness combinations (e.g. grey on grey)
Inverted QR codes: why they're risky
An inverted QR code uses light modules on a dark background — the opposite of standard. Technically, many modern scanners can read them. But in practice:
- ·Many older Android QR scanner apps cannot read inverted codes
- ·Some dedicated barcode scanners (used in retail/events) only read standard orientation
- ·Low-light conditions and low-quality prints make the contrast even harder to detect
- ·The quiet zone (border) must be dark-colored, which some designers overlook
Recommendation: if you need a dark background, use a light-colored QR code on the dark background rather than full inversion. Test extensively on 5+ devices.
Brand color QR codes: getting it right
- 1Pick your darkest brand colorUse your darkest brand color for the modules. Dark navy, forest green, and deep purple work well. Light brand colors (yellow, light blue) need a white or very light background.
- 2Check the contrast ratioUse a WCAG contrast checker (available free online) to verify your module color vs. background achieves at least 4.5:1 before generating the code.
- 3Keep the background white or very lightEven if your brand uses a colored background in marketing materials, use a white or very light QR code background for maximum reliability.
- 4Test before printing at scaleScan on iPhone Camera, Android Camera, Google Lens, and at least one QR scanner app. Print one copy and test in the actual lighting conditions where the code will be used.
Common questions
Can QR codes be any color?
Yes — QR codes can use any color combination as long as the contrast ratio between the dark modules and light background is at least 4:1 (recommended 4.5:1+). Standard black on white offers 21:1 contrast — the maximum.
What contrast ratio do QR codes need to scan reliably?
The ISO 18004 QR code standard recommends a minimum contrast ratio of 4:1. For real-world reliability across all devices and lighting conditions, 4.5:1 or higher is recommended. Use a WCAG contrast checker to verify your color combination.
Can I make an inverted QR code (white on black)?
Inverted QR codes (light modules on dark background) are technically valid, but many scanners — especially older Android devices and dedicated QR apps — struggle to read them. If you need a dark background, use a white border around the code and test extensively.
Can a QR code have a colored background?
Yes — the background can be any light color (light grey, cream, pastels) as long as the contrast ratio with the dark modules meets the 4.5:1 minimum. Avoid backgrounds that are close in lightness to the module color.
Can I use a gradient color in a QR code?
Gradients are risky. The contrast ratio must be maintained across the entire gradient range — if the gradient gets too light, modules near that area may not scan. Solid colors are significantly safer than gradients.
Also in QR code design: