CrispKit › QR code and barcode tools › Can a QR code be any color?

Can a QR code be any color?

Created by Saad Danish · Last updated

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 pairContrastResult
Black on white21.00:1Decoded in all 7 tests
Black on yellow13.71:1Decoded in all 7 tests
Navy on cream9.30:1Decoded in all 7 tests
Brown on beige8.20:1Decoded in all 7 tests
Purple on lavender7.57:1Decoded in all 7 tests
Dark green on white7.13:1Decoded in all 7 tests
Navy on white10.36:1All clean sizes; missed 1 of 3 noise patterns
Red on white4.83:1All clean sizes; missed 1 of 3 noise patterns
Orange on white2.80:1All clean sizes; missed 2 of 3 noise patterns
Light blue on white1.80:1Some sizes only
Yellow on white1.53:1Failed at every size
Mint on white1.28:1Failed at every size
Blue on red1.07:1Failed 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.

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

Colour it with a scan check

  1. Open QR Code Color and enter your link or text.
  2. Pick the code and background colours, a gradient or transparency.
  3. Watch the contrast ratio and the read-back check, then download PNG or SVG.

Every version is read back by a QR decoder before you download it.

Open QR Code Color

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.

  1. 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.
  2. DENSO WAVE, Error correction feature. Four error correction levels; "Level M (15%) is most frequently selected".
  3. 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.