Can a QR code be any color?
A QR code can be almost any colour, as long as the code is clearly darker than its background. Navy on cream, dark green on white and black on yellow all decoded in every test we ran. Yellow on white, mint on white and blue on red failed at every size.
Our results come from a software decoder, not from phones. Check your own colours with the QR Code Color tool, which reads every code back, and test a print with real phones.
What makes a colour pair scan
A scanner doesn't see "blue" or "red". It sees dark squares and light squares. DENSO WAVE's QR code site, qrcode.com, explains that reading is based on the difference in light reflected by the dark and light areas. So what matters is the gap in brightness between the two colours, not how different the hues look to you.
Contrast ratio measures that gap. It's the WCAG accessibility formula, which runs from 1:1 (the same colour) to 21:1 (black on white).
What 38 colour pairs did in our test
We drew 38 colour pairs as real QR codes and had a decoder (jsQR 1.4.0) read each one at four sizes, then blurred, shrunk and with noise added: seven tests in all.
| Colour pair | Contrast | Result |
|---|---|---|
| Black on white | 21.00:1 | Decoded in all 7 tests |
| Black on yellow | 13.71:1 | Decoded in all 7 tests |
| Navy on cream | 9.30:1 | Decoded in all 7 tests |
| Brown on beige | 8.20:1 | Decoded in all 7 tests |
| Purple on lavender | 7.57:1 | Decoded in all 7 tests |
| Dark green on white | 7.13:1 | Decoded in all 7 tests |
| Navy on white | 10.36:1 | All clean sizes; missed 1 of 3 noise patterns |
| Red on white | 4.83:1 | All clean sizes; missed 1 of 3 noise patterns |
| Orange on white | 2.80:1 | All clean sizes; missed 2 of 3 noise patterns |
| Light blue on white | 1.80:1 | Some sizes only |
| Yellow on white | 1.53:1 | Failed at every size |
| Mint on white | 1.28:1 | Failed at every size |
| Blue on red | 1.07:1 | Failed at every size |
That's 13 of the 38 pairs. The full table, with hex codes and every test, is on QR code color combinations that scan.
- Very low contrast failed. All five pairs that failed at every clean size had a contrast ratio of 1.53:1 or less.
- Dark on light was safest. Every dark-on-light pair at 2.8:1 or more decoded at all four clean sizes.
- Contrast didn't predict everything. All 12 pairs that passed every test had 7.13:1 or more, but navy on white (10.36:1) still missed a noise pattern.
The test used one decoder reading clean digital images: no printing, glare or camera. A pass is a good sign, not a guarantee.
Red QR codes: a warning from DENSO WAVE
Red on white passed every clean size in our software test, but DENSO WAVE warns against it. Its FAQ says scanners that use red light can't read a red code on a white background, or a blue code on green, because both colours reflect (or absorb) red light the same way. It adds that "detailed experimentation is necessary" before using coloured codes, and recommends black on white.
So if your code might be read by a dedicated barcode scanner, as at a till or in a warehouse, avoid red. If only phones will scan it, test it with several phones.
White and light-on-dark QR codes
A white code on a dark background is "inverted". jsQR read each of our light-on-dark pairs in at least some tests, but only when it tried the image a second time with the colours flipped. Don't assume every phone scanner app does that: dark modules on a light background are the safer choice, and test with the phones your audience uses. For a dark design, put the code on a light panel.
Tips for a coloured QR code
- Keep the code darker than the background, and aim for a contrast ratio of about 4:1 or more. That's the QR Code Color tool's rule of thumb; our test didn't establish a safe threshold.
- Gradients: both ends need to stay dark against the background. The tool checks the weaker end.
- Transparent backgrounds take the colour of whatever is behind them, so check the code against that colour.
- Logos: use a higher error correction level. DENSO WAVE says M (15%) is the most common; H (30%) recovers the most.
- Test a print with a few phones, in the light it will be used in.
Colour it with a scan check
- Open QR Code Color and enter your link or text.
- Pick the code and background colours, a gradient or transparency.
- Watch the contrast ratio and the read-back check, then download PNG or SVG.
Every version is read back by a QR decoder in your browser before you download it. Nothing is uploaded.
Open QR Code ColorFAQ
Can I make a QR code any color?
Almost any, if the code stays clearly darker than the background. In our decoder test, all five pairs that failed at every clean size had a contrast ratio of 1.53:1 or less, while every dark-on-light pair at 2.8:1 or more decoded at all four.
Does it matter what color a QR code is?
The brightness matters more than the hue. Navy on cream, dark green on white and brown on beige decoded in every test we ran, like black on white; yellow and pastels on white are too close in brightness. Avoid red if dedicated red-light scanners will read it.
Can I change the color of a QR code?
Make it again in the new colours. Scan the old code, copy the link or text it holds, and paste it into a colour QR generator. The new code opens the same thing.
Can a QR code be white?
Yes, on a dark background, but it's an inverted code and not every scanner app reads those. Our decoder only read light-on-dark codes on its inverted pass. A dark code on a light panel is safer.
What color background is best for a QR code?
White, or a pale colour. With a dark code, white, cream, light grey, beige, mint and lavender backgrounds all decoded in every test we ran, and so did black on yellow.
Do coloured QR codes scan on phones?
Usually, when the contrast is high, but our test used software, not phones. Print a test copy and scan it with a few phones before a big run.
Related
Sources
Each page below was read on 27 October 2026. The colour results are from our own test, QR code color combinations that scan (27 October 2026, jsQR 1.4.0), which is a software decoder reading clean digital images, not a phone test.
- DENSO WAVE, QR Code FAQ. Scanners that use red light can't read a red code on white or a blue code on green; "detailed experimentation is necessary before actually using colored QR Codes"; "please print out your QR Codes with black on a white background"; and that reading is based on the difference in light reflected by the dark and light areas.
- DENSO WAVE, Error correction feature. Four error correction levels; "Level M (15%) is most frequently selected".
- W3C, Web Content Accessibility Guidelines (WCAG) 2.1, contrast ratio. Contrast ratio = (L1 + 0.05) / (L2 + 0.05), ranging from 1:1 to 21:1. W3C Recommendation, 6 May 2025.