A QR code can be almost any color. Dark purple modules on a cream background. Navy on white. Forest green on light grey. Dark red on pale yellow. Most color combinations work — as long as one rule is never broken: the modules must be darker than the background. Always. Without exception.
The One Unbreakable Rule — Dark on Light
A QR code scanner reads modules by detecting luminance contrast — the difference in brightness between dark areas and light areas. The camera expects dark modules on a light background because this is how the format was designed and how every scanner is calibrated.
A color-inverted QR code — light modules on a dark background — will fail to scan on most devices. This is the single most common custom design error in branded QR code production. Dark logo, dark background, light squares. It looks striking. It does not scan.
What Color Combinations Work
Any combination where the module color is significantly darker than the background color works. Dark navy modules on white — works. Dark green on cream — works. Dark brown on beige — works. Dark purple on light lavender — works if the luminance contrast is sufficient.
The practical test: convert the design to greyscale. If the modules are visibly darker than the background in greyscale, the contrast is sufficient. If they blend — even slightly — the code will scan inconsistently in real-world conditions.
What Color Combinations Fail
Color combinations that fail: light modules on any dark background (inversion). Similar luminance colors — red modules on orange background, dark blue on dark navy, dark green on forest green. Metallic or iridescent finishes that shift luminance with viewing angle. Gradient backgrounds that are dark behind some modules and light behind others.
Module Color vs Background Color
Both the module color and the background can be non-black and non-white — the requirement is contrast between them, not that either must be standard black or white. A dark teal module on a light cream background is as scannable as black on white if the luminance contrast is maintained.