Qraft

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:

  1. 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
  2. Ensure sufficient contrast ratio: Aim for WCAG contrast ratio of 4.5:1 or higher. Avoid light gray on white or pastel-on-pastel combinations. Contrast ratios are easily checked with online tools like WebAIM Contrast Checker
  3. 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 (30% recoverable), QR codes remain readable even with about 30% of the area covered by a logo.

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 within 20% of the total QR code for safety. While 30% is theoretically possible, accounting for print distortion and dirt warrants 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.