QR Code Design Best Practices: Colour, Contrast and Quiet Zones
By Urlzee Team · Published · 6 min read
A QR code scans reliably when the pattern is clearly darker than a plain, light background, a blank margin four modules wide surrounds it, and the three corner squares are left untouched. Within those limits you can change colours freely; outside them, even a good-looking code may fail on some phones.
What does a scanner need from a QR code?
A scanner needs to find the code, work out its grid, and decide whether each square is dark or light. Every design rule follows from one of those three steps.
- Finding: the three large squares in the corners, called finder patterns, tell the camera where the code is and which way up it is. The blank margin around the code stops the scanner confusing nearby artwork with the pattern.
- Reading the grid: smaller alignment and timing patterns help the scanner map the squares even when the code is tilted or slightly curved.
- Deciding dark or light: the scanner converts the image to something close to black and white. If the two colours are too similar in brightness, squares get misread.
Design changes that keep all three steps easy are safe. Changes that interfere with any of them need testing, and some should simply be avoided.
Which colours work for QR codes?
Any dark colour on any light colour, provided the difference in brightness is large. Hue matters much less than lightness.
| Code colour | Background | Result |
|---|---|---|
| Black | White | Most reliable |
| Navy, dark green, dark purple, deep red | White or cream | Reliable |
| Black | Pale yellow, pale blue, light grey | Reliable |
| Mid-grey or pastel | White | Risky; too little contrast |
| Yellow, light orange | White | Usually fails |
| Red | Green of similar brightness | Fails; the colours differ but the brightness doesn't |
| White | Black (inverted) | Works on many phones, not all |
A quick check is to view your design in greyscale. If the code still stands out strongly from the background, a scanner will probably agree. If it turns into two similar greys, change one of the colours.
In Urlzee's QR code generator you can set the code colour and the background colour separately and see the preview update. Use the code colour for your brand shade and leave the background white or very pale.
How much contrast is enough?
There is no single official threshold that guarantees a scan, because cameras, lighting and print quality all vary. In practice, aim for a difference at least as strong as comfortable body text on a page, and then leave some extra.
Print changes colours. Ink on uncoated paper looks lighter and flatter than the same colour on screen, and a dark brand colour can dry to a mid-tone. Screens behave differently again under sunlight. Always judge contrast on the final medium, not in the design file.
Avoid gradients across the code unless both ends of the gradient are dark. A fade from navy to sky blue leaves part of the pattern too pale to read.
How wide should the quiet zone be?
Four modules on every side. A module is one small square of the pattern, so the margin scales with the code: if each module is 1 mm wide, the margin should be 4 mm.
The quiet zone must be the same colour as the code's background, and empty. That means no text, no border line, no rounded frame cutting through it and no photograph showing behind it.
Common ways the margin gets lost:
- cropping the image tight to the pattern to save space
- placing the code inside a coloured box that is barely larger than the pattern
- setting the code flush against the edge of a label or page
- overlapping a decorative frame or a "Scan me" banner
Many scanners tolerate a narrower margin, and generators often export with less than four modules, Urlzee's downloads among them. Treat the exported margin as the minimum to keep, and add more clear space around it in your layout.
Can you change the shape of the modules or corners?
The standard defines square modules, and that is what Urlzee generates. Some design tools offer rounded dots, connected lines or custom-shaped finder patterns.
These styled codes can work, because scanners sample the centre of each module rather than its outline. But they reduce the margin for error. Dots with gaps between them lower the amount of dark area the camera sees, and restyled finder patterns are the riskiest change of all, since a scanner that can't recognise them never starts decoding.
If you use a styled code, keep the finder patterns as plain squares within squares, keep the modules large, and test on older phones as well as new ones.
Is it safe to add a logo to the middle?
It can be, with care. A logo covers part of the pattern, and the code survives only because of error correction, which can rebuild a limited share of missing data. Level H restores about 30% of codewords, level M about 15%.
If you add a logo in a design tool:
- Generate the code at High error correction.
- Keep the logo small and centred, well under the recovery limit.
- Keep it clear of the three corner finder patterns.
- Put a small light border around the logo so it doesn't blend into neighbouring modules.
- Test the finished artwork on several devices.
Urlzee's generator does not embed logos, so this is something you would do in your own design software. Remember that the logo uses up tolerance that would otherwise cover scratches and dirt. The details are in QR code error correction levels.
What background should a QR code sit on?
A flat, light, single colour. Patterns, textures and photographs behind the modules make it hard to decide which squares are dark.
If the surrounding design is busy or dark, put the code on its own white or pale panel. Make the panel big enough to contain the full quiet zone. On transparent labels and windows, print an opaque white layer behind the code, because otherwise the background is whatever happens to be behind the glass.
Also avoid transparent PNG backgrounds unless you are certain of what will sit behind them. A code exported with a transparent background and dropped onto a dark slide becomes dark-on-dark.
What should you put around the code?
Words. A code with no explanation asks people to trust a square. A short line of text improves both scanning rates and confidence:
- say what happens: "Scan to see the menu", "Scan to register"
- show the destination in text, ideally a readable short link such as
urlzee.com/harbour-menu, made with a custom alias - keep the text outside the quiet zone
Printing the link has a safety benefit as well. People are increasingly aware of QR code phishing, and a visible address that matches what their phone shows after scanning is reassuring.
How do you test a design before it goes out?
Test the real thing, at real size, in real conditions.
- Export the final artwork and print it on the intended material, or display it on the intended screen.
- Scan from the expected distance. The QR code size guide helps you judge whether the size suits it.
- Use at least two phones, including an older one if possible, and the built-in camera rather than a specialist app.
- Try poor conditions: dim light, a steep angle, a reflection across the surface.
- Confirm the page that opens is the right one and loads properly on mobile.
A code that scans instantly in all of those is finished. If it hesitates in any of them, increase contrast, size or margin before changing anything else.
Frequently asked questions
- Can a QR code be any colour?
- The code can be coloured as long as it stays much darker than its background. Dark blue, dark green, deep red or black on white or a pale tint all work; pale codes and low-contrast pairs often fail.
- What is the quiet zone on a QR code?
- It is the blank margin around the pattern that separates it from surrounding artwork. The QR standard specifies a margin four modules wide on all four sides.
- Can I invert a QR code so it is white on black?
- It is risky. Many modern phone cameras read inverted codes, but some scanner apps and older devices do not, so dark-on-light is the dependable choice.
- Can I put a QR code on top of a photo?
- Not directly. Place a solid light panel behind the code, large enough to include the quiet zone, so the background beneath the pattern is uniform.