On this page
How a scanner sees color Rules that keep colored codes working Using your brand colors Questions- Lightness matters, not hue.
- Contrast 4.5:1 minimum, 7:1 for print.
- Check the lightest color in a gradient.
How a scanner sees color
Before decoding, the camera turns the image into black and white using a brightness threshold. Your bright orange becomes either "dark" or "light" based on how bright it is. So the only question is: are the dots clearly darker than the background?
Contrast ratio measures exactly that, from 1:1 (no difference) to 21:1 (black on white).
Rules that keep colored codes working
- Dark dots, light background. Use a contrast ratio of 4.5:1 at minimum, and 7:1 for print.
- Check the lightest part of a gradient. A gradient is only as good as its weakest color.
- Color the corner squares freely, but keep them dark. The three big corner squares are how scanners find the code, so they need the same contrast as the dots.
- Be careful with inverted codes. Light dots on a dark background work in most modern phone cameras, but not in every scanner app or retail scanner. See inverted QR codes.
- Avoid busy backgrounds. Photos or patterns behind the code confuse the threshold. Put the code on a solid panel.
Try a warm gradient that passes the contrast check, then make it your own.
Use sunset presetUsing your brand colors
If your brand color is light, such as yellow, mint or sky blue, don't use it for the dots. Use it for the frame, the corner centers or the background panel around a dark code instead. If your brand color is mid-tone, darken it by 20–30% for the dots; most people won't notice the shift.
The QRaft generator rates contrast for every color you pick, including the corners and both gradient colors, and runs a real decode test so you know before you download.
Questions
Can a QR code be any color?
Almost. The dots must be clearly darker than the background. Aim for a contrast ratio of 4.5:1 or more; hue does not matter, lightness does.
Do gradient QR codes work?
Yes, as long as the lightest color in the gradient still has strong contrast with the background.