Design and printing

QR code colors: contrast rules that keep codes scannable

Which QR code colors scan reliably: dark on light, strong contrast, careful gradients, and why inverted or pastel codes fail. With safe and risky examples.

QR codes can be any color, as long as the code is much darker than its background. Dark modules on a light background, with strong contrast between them, scan reliably on every phone. Black on white is the safest, and dark brand colors (navy, dark green, deep red, brown) on white or a pale tint work well too. Problems start with pale codes, similar-brightness color pairs, and inverted codes, where the code is light and the background dark.

The three color rules

1. The code must be darker than the background

Scanners look for dark modules on a light background. The QR code standard defines the code that way, and most scanner software is tuned for it. A navy code on a cream background is fine; a cream code on a navy background is an inverted code (see below).

2. Contrast matters more than color

A scanner mostly sees brightness, not hue. Red on green may look vivid, but if both colors are similarly bright, the camera sees two similar grays and can’t tell the modules apart. Compare colors by their lightness, not their hue.

A practical way to measure this is the contrast ratio used for web accessibility (WCAG), which runs from 1:1 (no contrast) to 21:1 (black on white). It isn’t part of the QR standard, but it’s a useful yardstick:

Contrast ratio What to expect
7:1 or more Reliable, including in print and dim light
4.5:1 to 7:1 Usually fine on screens and good prints. Test it
3:1 to 4.5:1 Risky. Some phones and lighting will fail
Below 3:1 Likely to fail. Choose darker or lighter colors

3. Keep the corners and the margin clean

The three corner squares (finder patterns) must be clearly visible, and the blank margin around the code (the quiet zone) must be the same light color as the background. Colored corner squares are fine if they’re as dark as the rest of the code.

Six sample QR codes in a grid: black on white, navy on cream, and dark green on pale yellow marked as safe; light gray on white, white on black, and red on green marked as risky
Dark on light with strong contrast is safe. Pale, inverted, and similar-brightness pairs are where codes fail.

Color combinations, rated

Code Background Verdict
Black White Safest
Navy, dark green, dark brown, maroon White, cream, pale tint Good
Dark brand color Pale version of the same color Good, if the contrast is strong
Mid gray, light blue, orange White Risky: too pale
Red Green (or the reverse) Risky: similar brightness
White Black or a dark color Inverted: fails on some scanners
Any color A photo or pattern Risky: busy backgrounds confuse scanners
Any color Transparent Depends on what it’s placed on. Test it there

Gradients

A gradient is fine if its lightest part is still clearly darker than the background. A gradient from black to dark blue on white works. A gradient that fades to a pale color loses contrast in that area, and the modules there become hard to read. Check the contrast at the lightest point.

Inverted QR codes

Inverted codes (light modules on a dark background) look stylish on dark brand designs. The QR code standard allows for these reversed codes, but not every scanner reads them, so some people won’t be able to scan your code. If you must use one, test it with several phones and apps, including older ones. Otherwise, put a dark code on a light panel within your dark design.

Printing colors

  • Screens and print differ. A color that looks dark on screen can print lighter. Check a printed proof.
  • Avoid metallic and fluorescent inks for the code. Gold foil, silver, and neon inks reflect light and can look pale to a camera.
  • Mind the paper. On colored or kraft paper, the paper is your background color. Print the code in a dark ink.
  • Matte beats glossy. Glossy finishes add glare, which washes out contrast.

Common questions

Can a QR code be red?

Yes, if it’s a dark red on a light background. Bright red on white has lower contrast than you might expect; a deep red or maroon is safer.

Does color affect how far away a code can be scanned?

Yes. Lower contrast means the phone needs to be closer and the lighting better. If you use brand colors, print the code a little larger. QR code size for printing has the sizing rule.

Can I use a transparent background?

You can export one, but the code then takes on the color of whatever it’s placed on. Make sure that surface is light and plain where the code and its margin sit.

A note on EveryQR

EveryQR lets you set separate colors for the code, the background, and the corner squares, with solid colors or gradients. It warns when contrast drops below 3:1, when a code is inverted, or when the background is transparent or a picture, and its readability check reads the design back before you export it. A design that fails the check can’t be exported, so you won’t print a code that doesn’t scan. How to add a logo to a QR code covers the other common design risk.

Browse all QR code guides.

All QR codes guides