Skip to content

Guides

How to make a colour QR code that still scans

Artem Okhten · Updated

A scanner looks for dark squares on a light background. Styled codes usually fail for one of four reasons: weak contrast, inverted colours, no margin, or too much packed into the code.

Dark dots, light background

Keep the dots clearly darker than the background. Pastel dots on white fail often. If you use a gradient, both ends need to be dark.

Light dots on a dark background is an inverted code. Recent phone cameras mostly read it, but older apps and some shop scanners do not. If the code is going on something you cannot reprint, do not invert it.

A quick test: squint at the preview. If the code blurs into the background, a scanner will struggle too.

Leave a margin

The empty border around a code, the quiet zone, tells the scanner where the code ends. The QR standard asks for four modules of it. The margin slider starts at 12 pixels; do not set it to zero if the code will sit near the edge of a card or on a busy background.

With a transparent background, the margin is transparent too, so whatever the code is printed on has to be light.

Adding a logo

A logo covers part of the code, so the code needs spare data to recover it. The generator handles this itself: with a logo it switches to the highest error correction level, H, which can rebuild about 30% of the code. Without a logo it uses Q for short content, M above 120 characters and L above 250.

Keep the logo near the small end of the 20–50% slider and leave "Clear dots behind logo" on.

Shorter content, simpler code

Every extra character adds dots. A long link with tracking parameters makes a dense code that is hard to scan when printed small or read from a distance. Remove what the link works without before you generate the code.

Export and test

  • SVG for print: it stays sharp at any size.
  • PNG for screens and slides. The export size goes from 128 to 1024 pixels.

Print one at the real size and scan it with two different phones from the distance people will actually stand. A common rule of thumb is that a code can be read from about ten times its width.

Try it in the QR Code Generator. It runs in your browser and nothing is uploaded.