Can QR codes be different colors? Rules that keep them scannable
Yes, QR codes can be any color if contrast is strong and the code stays dark on light. Learn the safe color rules, the risks of inverted codes and logos.
Add LearnQRCode as a preferred source on Google
Quick answer
- Yes. Scanners look for contrast between dark and light modules, not specific colors.
- Keep the code dark on a light background with strong contrast, such as navy, dark green or deep purple on white.
- Inverted codes, pale colors and big logos are the usual reasons colored codes fail, so test on several phones.
At a glance
- 1Dark modules on a light background
- 2Check the design in grayscaleContrast in lightness, not just hue
- 3Inverted codes carry more riskNot every scanner reads light on dark
- 4Keep logos small, corners clearRaise error correction to Q or H
In this guide
QR codes can be almost any color. But color is also the easiest way to break a code, so follow a few rules.
How scanners see color
A scanner doesn’t read colors. It sorts modules (squares) into dark and light and decodes the pattern. Every dark module must be clearly darker than the background. Black on white gives the biggest difference, which is why it is the default.
The safe color rules
1. Dark modules, light background
| Works well | Risky |
|---|---|
| Navy on white | Yellow on white |
| Dark green on cream | Light grey on white |
| Deep purple on pale lavender | Red on black |
| Dark brown on beige | Mid blue on mid green |
| Black on pastel | White on a photo |
Quick check: convert the design to grayscale. If modules and background don’t look clearly different, the code is likely unreliable.
2. Contrast in lightness, not just hue
Red and green at similar brightness can become nearly the same gray for a camera, and for people with color vision deficiency. Choose colors that differ in lightness.
3. Keep gradients dark
A gradient from navy to purple can work. One that fades to pale blue makes some modules no longer “dark”.
4. Keep the quiet zone plain
DENSO WAVE specifies a blank margin four modules wide, in the same light color as the background, not a pattern or photo. See QR code size.
5. Watch how colors print
Screen colors (RGB) shift in print (CMYK). Always print a proof. See how to print QR codes.
Inverted QR codes (light on dark)
A white code on a black poster looks striking, and many modern phone cameras read it. Not every scanner app does, so it carries more risk. The safer option on a dark design: a light box behind a normal dark-on-light code, with a four-module margin. If you do invert, test with several phones and apps, including older devices.
Logos, dots and other decorations
Many generators (for example QRJiffy’s custom-design QR code generator, made by our publisher, DPR Software Labs) can round modules into dots, reshape corners or add a logo. This works because of error correction, extra data that lets a scanner rebuild unreadable parts.
DENSO WAVE’s four levels restore roughly 7% (L), 15% (M), 25% (Q) and 30% (H) of the data. A logo uses up part of that margin before any scratches, glare or folds. DENSO WAVE warns that overlaying a design can deform a code so that a tiny smeared part makes reading slow or impossible. So:
- Keep logos small and centered, away from the three corner squares (finder patterns).
- Raise error correction to Q or H with a logo, and print a little larger.
- Don’t over-style: dots plus custom corners plus a logo plus a gradient compound the risk.
- Never cover the corner squares or the quiet zone.
Changing colors in common tools
- Generators: use the color pickers; the dark color goes in the foreground.
- Word (Windows): DisplayBarcode takes
\f(foreground) and\b(background) as RGB values, such as\f 0x14213D. See how to create a QR code in Word. - Vector files: an SVG or EPS can be recolored precisely without losing sharpness.
Using brand colors
If your brand color is light (yellow, orange, sky blue), use it for the frame or call-to-action text, and keep the modules in your darkest brand shade.
Test before you commit
- Scan with an iPhone and an Android using the built-in camera.
- Try an older or budget phone.
- Test the print in its real light.
- If it is slow to lock on, increase contrast first.
Still failing? See QR codes that won’t scan.
Frequently asked questions
- Do QR codes have to be black and white?
- No. Any color pair works as long as the dark modules are clearly darker than the background. Black on white simply gives the highest contrast, which is why it is the default.
- Can you change the color of a QR code?
- Yes. Most QR code generators let you choose foreground and background colors, and Word for Windows can set colors with switches on its DisplayBarcode field. The content of the code doesn’t change when you change its color.
- Can I put a logo in the middle of a QR code?
- Often, yes, because error correction can recover the covered area. DENSO WAVE warns that overlaying illustrations can make codes slow or impossible to read, so keep the logo small, raise the error correction level and test thoroughly.
- Can two QR codes look the same?
- Two codes with identical content and identical settings produce the same pattern. Change anything, such as one character of a link or the error correction level, and the pattern changes.


