The background of a QR code is not decoration. It is half of the signal the camera reads. A pale yellow or ivory background often works; a mid-grey, a pastel pink or a saturated brand blue usually does not. The deciding factor is luminance contrast against the modules and the reflectance of the quiet zone. This guide gives practical colour choices and the test that settles any argument.
Why Background Colour Matters More Than Module Colour
The scanner converts the image to black and white using a threshold. If the background and the modules reflect similar amounts of light, the threshold cannot separate them, and the data region turns into noise. That is why a slightly darker background can break a code that looked fine on a monitor.
ISO/IEC 18004 requires a print contrast signal of about 0.6, roughly a 40% luminance difference. A practical target is a 4:1 luminance ratio or higher between the dark modules and the background. Black on white is about 21:1, which is why it is the default.
The quiet zone must match the background. If the code has a white background but sits inside a pale grey border, the scanner sees a dark edge where it expects a light margin, and finder detection can fail.
Background Tokens That Work
| Background | Foreground | Contrast | Use |
|---|---|---|---|
| #FFFFFF white | #000000 black | Very high | Any print |
| #FEFFEF ivory | #0F6E56 forest green | High | Premium packaging |
| #FFF8E7 cream | #000000 black | High | Menus, stationery |
| #F3F4F6 pale grey | #000000 black | High | Digital screens |
| #D1FAE5 mint | #0B1F3A navy | Good | Marketing, if tested |
| #FDE68A light amber | #111827 charcoal | Borderline | Proof before printing |
| #9CA3AF mid grey | #000000 black | Too low | Avoid |
The safe rule is simple: keep the background light and the modules dark. If a brand colour is too dark to serve as a background, use a light tint of it, or print a white patch behind the code.
Do not rely on a colour name. Two hex codes both called cream can differ enough to change the scan result. Use the exact value from the generator and keep it in the design system.
Inverted Backgrounds and Dark Mode
A light code on a dark background is an inverted QR symbol. Some cameras decode it, but support is inconsistent and the finder patterns are specified as dark squares on a light field. On a website with a dark theme, render the code on a light card rather than inverting it.
The same applies to PDFs and apps that force dark mode. A QR code pasted into a dark-themed document can be inverted automatically. Export the code as an image with its own light background, not as transparent line art that inherits the document theme.
If inverted branding is non-negotiable, test it on at least three phones under several lighting conditions before committing. A code that fails on one common device is not acceptable on printed material.
Print Surfaces Change the Colour
A hex value describes a screen colour, not a printed one. Uncoated stock absorbs ink and lowers contrast; gloss laminate adds glare; a coloured substrate shows through thin ink. Always proof on the final material.
For packaging, print a solid light patch under the code rather than relying on the substrate to be light enough. For stickers, use matte vinyl rather than gloss so that a camera flash does not produce a white blob over the data region.
Keep the quiet zone free of print effects. A faint texture, a watermark or a pattern inside the margin counts as a non-light area and reduces the effective margin.
A Five-Minute Check
- Generate the code with the exact background hex and level Q or H.
- Print a proof at final size on the final material, including any laminate.
- Scan with an iPhone, an Android phone and one budget device.
- Repeat under daylight, indoor lighting and camera flash.
- If any scan fails, move the background lighter before changing anything else.
The colour contrast guide explains why luminance decides the result. For custom palettes, the colored QR generator exports a proof you can print.
