QR code on black background — the inverted-contrast rule
"QR code on black background" is one of the most-searched QR design queries because dark mode UI is everywhere and brand teams want their codes to match. The catch most designers miss: a QR code's scannability depends on contrast between modules (the squares) and the background — not on which is which.
A standard QR code is dark modules on a light background. The scanner reads dark squares against the surrounding light field. Reverse the contrast — light modules on a dark background — and the scanner still reads it correctly, as long as the contrast ratio holds. iOS 11+ and Android 9+ both parse inverted QR codes natively.
What doesn't work: dark modules on a dark background. If you set the QR background to black and keep modules black or charcoal, the scanner sees a uniform dark field with no decoding signal. The "black QR code" that fails scans almost always has this issue: the designer set the background to black but forgot to invert the modules.
The correct black-background QR setup:
- Background: solid black (#000000) or very dark hex like #1a1a1a
- Modules: pure white (#FFFFFF) or near-white like #F5F5F5
- Contrast ratio: 4.5:1 minimum (WCAG AA); ideally 7:1+ (WCAG AAA)
- Error correction: level Q or H to compensate for the inverted-scan path
A brand asset that needs to match a dark UI: white modules on a brand-dark background (like deep navy or near-black brand hex). Verify the contrast holds — some brand "blacks" are actually #2a2a2a, which against white modules still hits 7:1, well above threshold.
For printing a black-background QR, the practical concern is ink coverage. A solid black field is 100% ink density, which can bleed or pool depending on the press and substrate. For digital printing on coated stock, it's usually fine. For uncoated stock or offset printing on absorbent paper, the ink can spread and reduce module crispness. Test with the actual press and substrate before committing to volume.
Logo placement — how much of the code can a logo cover
The maximum safe logo size depends on the QR code's error correction level, which determines how much of the code can be obscured before the scan fails.
QR codes have four error correction levels:
- L (Low): 7% recovery — minimum redundancy, smallest code, lowest logo budget
- M (Medium): 15% recovery — most generators' default
- Q (Quartile): 25% recovery — moderate redundancy, more modules
- H (High): 30% recovery — maximum redundancy, largest code, highest logo budget
With level M (default on most generators), a centered logo can safely cover up to ~10% of the code area before scan reliability drops. With level H, that budget jumps to ~25%. The trade-off: higher error correction means more modules, which means the QR encodes the same data in a denser pattern. For print at scale, denser modules require larger physical sizes to scan reliably.
For the most common scenario — a brand logo or icon centered in a QR code that will live on packaging, signage, or print media — switch error correction to level H before generating. EZQR validates this automatically: if you upload a logo larger than what the current error correction can support, you'll see a warning before export. Our error correction levels guide covers the per-level technical detail.
For logo placement, dead-center is the geometric ideal. Off-center logos work but require the same scan-reliability checks. Logos in the corners interfere with the finder patterns (the three large nested squares) and break scanning entirely — never place a logo in a corner of a QR code.
Logo file format: SVG or transparent PNG. The logo needs a transparent background so the QR's modules show through around the logo edges. A logo with a white background that hides QR modules underneath is the same as if those modules were missing — the error correction has to recover them.
Logo color: ideally a color distinct from the QR modules and background. A black-on-white QR with a black logo blurs the logo into the modules under low light. A red or brand-color logo on a black-on-white QR maintains visual separation.
Custom colors — the contrast math behind scan reliability
Brand color application is the second-most-requested QR design choice after logo placement. The technical rule: contrast ratio between modules and background must hit 4.5:1 minimum for reliable scanning under variable lighting.
Contrast ratio is a calculated value between 1.0 (no contrast, invisible) and 21.0 (pure black on pure white). WCAG accessibility guidelines define 4.5:1 as the minimum for body text legibility — and that threshold maps cleanly to QR code scan reliability across iOS and Android cameras.
For brand color application:
- Dark brand colors on white backgrounds work great if the brand color hits 4.5:1 against white. Most brand "blues," "greens," "reds," and "purples" do. Most brand "yellows," "oranges," and "pinks" do NOT — these typically hit 2.5-3.5:1 against white, well below threshold.
- Brand colors on brand-tinted backgrounds rarely work. Sage-green modules on cream background looks beautiful, scans at 50-60% under restaurant lighting. The aesthetic loses to the math.
- Inverted (light-on-dark) works if the contrast holds. White modules on a brand-deep-navy background can hit 12:1+ — fully reliable.
- Two-color modules (gradients, multi-color stripes through the QR) almost always fail. Some custom generators let you do this; the result looks great in the design file and fails scan reliability tests. Stick to a single foreground color per QR.
For testing, the practical workflow: generate the QR with your custom colors, take a screenshot, drop it into a contrast-ratio checker (any free WCAG contrast tool online), and verify against 4.5:1 before committing. If it fails the test on a monitor under ideal lighting, it will fail more under real-world lighting.
Our QR code color guide covers the safe brand palette ranges by hue family with specific hex examples and contrast scores.
The quiet zone — the invisible part of QR code design
Every QR code requires a clear margin around the visible code — the "quiet zone." The spec defines it as 4 modules wide on every side. This blank space lets the scanner locate the three finder patterns (the corner nested squares) by detecting where the QR pattern ends and the surrounding field begins.
Designers frequently crop the quiet zone tight against background graphics, text, or other design elements because it "wastes space." The result: scan reliability drops 20-30% under non-ideal lighting, because the finder pattern detection has to work harder. The fix is non-negotiable: preserve the 4-module quiet zone on every side, no exceptions.
Quiet zone color: ideally matches the QR background. A white-on-black QR needs a black quiet zone. A black-on-white QR needs a white quiet zone. Mixing — say, a white QR background with a navy quiet zone bleed — breaks scan reliability the same way module-level color mistakes do.
Quiet zone size for variable backgrounds: if the QR sits inside a larger design with complex background art (textured paper, photo overlay, gradient), the quiet zone must be a solid color (matching the QR background) before the surrounding design takes over. Print at the smaller of: 4 modules wide, or 5% of the QR's width — whichever is larger.
For packaging and labels where space is tight, the temptation is to crop the quiet zone to 2 modules or fewer. Don't. The cost of a slightly-larger QR placement is much smaller than the cost of a print run with broken scan reliability.
EZQR exports include the quiet zone automatically at the correct dimension for the chosen error correction level. Some lower-end generators don't — always verify the exported file includes white space around the code before sending to the printer.
iOS vs Android — the two cameras you must test against
A QR code that scans reliably on the design team's iPhone might fail on a customer's Android, or vice versa. The two operating systems parse QR codes differently, and "tested on my phone" is not enough.
iOS (iPhone 11+) uses Apple's native camera app and the underlying Vision framework. iOS is generally more forgiving on:
- Low contrast (iOS will attempt scans down to ~3:1 ratio)
- Color variations (iOS adapts to brand-color QR codes more aggressively)
- Slight angular distortion (10-15° tilt is usually OK)
iOS is less forgiving on:
- Small physical size relative to camera distance (iOS needs larger codes than Android at the same distance)
- Reflective surfaces (glossy laminates, screen-displayed QRs)
Android (9.0+) uses Google's ML Kit barcode scanner via the system camera. Android is generally more forgiving on:
- Small physical size (Android handles smaller codes at the same distance)
- Pattern density (Android scans denser codes reliably)
Android is less forgiving on:
- Low contrast (Android needs the 4.5:1 minimum more strictly than iOS)
- Geometric distortion (Android struggles past 10° tilt)
- Inverted colors on older Android versions (8.0 and below sometimes fail on white-on-black QRs)
For production testing, the minimum kit:
- iPhone X or later (covers ~85% of active iPhone install base)
- Samsung Galaxy S10 or later, or Pixel 4 or later (covers most active Android install base)
- One older device per platform (iPhone 8, Galaxy S8) to catch edge-case failures
- Test under: bright daylight, indoor office light, dim restaurant/bar light, and screen-displayed (laptop, second phone)
A single device test misses 30-40% of real-world scan failures. A four-device test under four lighting conditions catches nearly all of them.
Common QR design failures we see in print
A short list of design failures we've seen kill print runs, with the diagnosis and fix for each.
Failure 1: Light brand color on white background. A pastel-blue QR on white looks great in the design file and scans at 40-60% under retail lighting. Fix: pick a darker brand color that hits 4.5:1 against white, or use white modules on a dark brand background.
Failure 2: QR code rasterized in Photoshop. A vector QR exported as SVG, opened in Photoshop, "flattened," then exported as PNG — the path data is destroyed. The PNG can be scaled up but pixelates immediately. Fix: keep the QR in vector form (SVG, EPS, PDF) throughout the design workflow. See our vector export guide for the format-by-format detail.
Failure 3: QR covered by a "scan me" label that overlaps the code. Designers add a CTA bubble or arrow that physically intrudes on the QR pattern. Even partial overlap drops reliability. Fix: keep CTA elements outside the quiet zone — they can be 0.5 cm from the QR edge, but not closer.
Failure 4: QR on a glossy laminate surface. Glossy finishes create specular reflections that confuse the camera. Under window lighting or overhead spotlights, the QR can be impossible to scan at certain angles. Fix: use matte or satin lamination for any QR-bearing surface. The print cost difference is negligible; the scan reliability difference is significant.
Failure 5: QR designed at small size for a large print. The QR is mocked up at 2 × 2 cm in the design file, then scaled to 20 × 20 cm at print time without re-checking the math. If the original was a low-error-correction code, scaling up doesn't add redundancy — it just makes the failure mode larger. Fix: design at the final print size and verify error correction at that size.
Failure 6: Brand approval rounds that "tweak" the QR. A QR goes through design review, marketing review, brand review, legal review — and at some point someone "softens the corners" or "adds brand polish" to the code. Every micro-adjustment risks breaking scan reliability. Fix: lock the QR design after the first scan test and treat it as untouchable in subsequent design rounds.
If you only do one thing before a print run with custom QR design, scan the proof under the actual lighting where the QR will live. That single test catches every failure mode above and a dozen more we didn't list.