Best filament colours for a QR code that scans
Pick the colours by contrast, not by taste. We measured the brightness contrast of common PLA colours: some combinations that look striking on the bed are invisible to a phone camera.
The rule: dark code on a light base
QR readers expect dark squares on a light background. Almost every phone also reads the reverse (a light code on a dark base), but not every app or older phone does, so a printed part that has to work for everybody should stick to dark on light.
What matters is the difference in brightness, not in hue. Red and green look completely different to us, but they have a similar brightness, and to a camera they are almost the same grey.
Contrast between common filament colours
We calculated the contrast ratio (the same measure used for text on web pages: 1 means no difference, 21 is pure black on pure white) for the colours in the generator, which match typical PLA shades. As a guide: 7 or more: excellent 4.5 to 7: good 3 to 4.5: risky under 3: will not scan reliably
| Base | Code | Contrast | Verdict |
|---|---|---|---|
| White | Black | 15.0 | Excellent |
| White | Navy blue | 12.6 | Excellent |
| Yellow | Black | 10.2 | Excellent |
| Wood beige | Black | 9.4 | Excellent |
| Yellow | Navy blue | 8.5 | Excellent |
| Pink | Black | 7.4 | Excellent |
| White | Blue | 6.3 | Good |
| White | Red | 5.0 | Good |
| White | Green | 4.5 | Good |
| Grey | Black | 5.1 | Good |
| Yellow | Red | 3.4 | Risky |
| White | Grey | 2.9 | Avoid |
| White | Orange | 2.8 | Avoid |
| White | Pink | 2.0 | Avoid |
| White | Yellow | 1.5 | Avoid |
The generator does this calculation for you: when you pick the two filament colours it shows the contrast and warns you in red below 3, and in amber if the code is lighter than the base.
Brand colours
If your brand colour is light (orange, yellow, light green), use it for the base and print the code in black or navy: yellow and black is one of the best combinations there is. If your brand colour is dark (navy, bottle green, burgundy), use it for the code on a white or beige base.
Finishes that cause trouble
- Silk and metallic PLA. They reflect light like a mirror. From some angles a silk gold code turns white with glare and the phone loses it. Use matte filament at least for one of the two parts, ideally the base.
- Transparent and translucent. Light passes through the base, so what the camera sees depends on what is behind the part. Avoid them for the base.
- Glow in the dark. It works as a base in daylight (it is usually a pale green or cream), but in the dark the light comes from the base, so the code reads as a reversed QR. Fine as a curiosity, not for a sign that has to work.
- Marble, glitter and multicolour. Speckles and gradients add noise. Use them for the base only if the code is black and the part is large.
- Wood filament. A good matte base with a black code. It is slightly darker than it looks on the spool, so avoid dark brown codes on it.
Outdoors and in the sun
Sunlight fades many PLA colours and softens PLA in a car or a sunny window. For a plaque outside a door, print in PETG or ASA, with a white base and a black code. Black barely fades, so the contrast holds for years.
Frequently asked questions
What is the best colour combination for a 3D printed QR code?
Black on white, followed by navy on white and black on yellow. All three have very high contrast and work in any light.
Can I print a white code on a black base?
Many phones read inverted codes, but not all apps or older phones do. For a part anyone has to scan, use a dark code on a light base.
Why doesn't my red-on-green QR code scan?
Red and green have almost the same brightness. The camera reads the code in greys, and to it both colours are the same grey.
Is silk PLA a good idea?
For one of the two parts at most. Silk reflects light and, from some angles, the glare hides the code. A matte base is the safe choice.
Which filament should I use for an outdoor plaque?
PETG or ASA, in white and black. PLA softens in the sun and many PLA colours fade.