Can You Change QR Code Colors? Color Design Rules
Why Colored QR Codes Still Work
QR code scanners recognize contrast between "light" and "dark" areas, not specific colors. The camera converts captured images to grayscale and binarizes them into white (light) and black (dark) based on a threshold. Any color combination with sufficient contrast ratio will scan successfully.
For example, dark navy modules on a white background, or black modules on a light yellow background work fine. Brand colors can be freely incorporated as long as contrast rules are followed. Companies like Coca-Cola (red) and Starbucks (green) widely use brand-colored QR codes.
Three Rules to Follow
Rules for changing QR code colors:
- Dark colors for modules, light colors for background: Scanners recognize dark areas as modules (data). Reversing this relationship causes finder pattern detection failure, preventing QR code recognition entirely. This is the most common failure pattern
- Ensure sufficient contrast ratio: Aim for a contrast ratio of 4:1 or higher between dark and light modules, the practical working guideline (WCAG's 4.5:1 is a separate criterion, meant for humans reading text). Avoid light gray on white or pastel-on-pastel combinations. Contrast ratios are easily checked with online tools like WebAIM Contrast Checker, but a passing number is only a guide: confirm with an actual scan
- Don't use gradients: Color variation within modules blurs light-dark boundaries, causing scan errors. Gradients that fade at module edges are particularly fatal
Color Combinations to Avoid
These color schemes cause scanning errors:
- White modules on dark background (inverted): Scanners misinterpret light and dark, failing to decode data correctly. Looks cool but drastically reduces scan rates
- Red and green combinations: Beyond color vision accessibility, some camera sensors show insufficient contrast. Recognition rates drop especially on budget smartphones
- Yellow modules on white background: Contrast ratio of only about 1.07:1, making recognition nearly impossible
- Multi-colored modules: Varying module colors within one QR code creates uneven contrast. Changing finder pattern (three corner squares) colors drastically reduces recognition
Logo QR Code Design
Placing logos in QR code centers is widely used to balance brand recognition with functionality. This works thanks to QR code error correction. At error correction level H, about 30% of the codewords — the data itself — can be recovered, and that is what leaves room for a logo over the center. The 30% is a share of the data, not permission to hide 30% of the area.
Several caveats apply. First, always place logos in the center. Logos overlapping finder patterns or timing patterns (lines indicating module positions) at the three corners make scanning impossible. Second, keep logo area around 20% of the total QR code for safety, with about 25% as the upper limit when using level H error correction. The theoretical ceiling corresponds to 30% of the data, but where the loss falls, together with print distortion and dirt, can stop a scan well before that, so leave margin.
Use white or transparent logo backgrounds to clearly delineate from QR code modules. If logo colors match module colors, blurred boundaries cause scan errors.
Print vs Digital Considerations
QR code colors appear differently depending on the display medium. Colors vibrant on screen may darken or lose contrast when printed.
For print: Specify colors in CMYK and test-scan actual printed materials. Glossy paper can cause lighting reflections that hinder scanning. Matte paper provides more consistent results. Inkjet printers may cause fine module bleeding, so laser printers offer higher precision.
For digital display: Specify colors in RGB. Contrast varies with screen brightness settings, so verify readability at minimum brightness. Dark mode apps may automatically darken backgrounds, risking inverted QR code light-dark relationships.
In all cases, the best practice is test-scanning the finished design on at least 3 smartphone types (iPhone, high-end Android, budget Android) to verify scan rates.