Can You Change QR Code Colors Without Breaking It?

A black-and-white QR code gets the job done, but it doesn't exactly match your brand. The good news: you can absolutely change QR code colors. The catch: there are a few rules you need to follow, or the code will look great and scan terribly.

Yes, You Can Customize QR Code Colors

QR code scanners don't care about the specific colors — they care about the contrast between the dark modules (the data) and the light background. As long as the scanner can clearly tell the two apart, the code will work.

This means you can swap black for dark blue, dark green, dark red, or any deep color that reads as "dark" to a camera sensor. You can change the white background to cream, light gray, or a pale tint of your brand color. The key is maintaining a strong visual difference between the two.

Rule 1: Keep Dark Modules on a Light Background

This is the most important rule. QR code scanners are designed to look for dark patterns on a light surface. The three finder patterns (the large squares in the corners) are how the scanner orients itself, and it expects them to be darker than their surroundings.

What works:

  • Dark navy modules on a white background
  • Dark green modules on a cream background
  • Dark maroon modules on a pale pink background
  • Black modules on a light yellow background

What breaks:

  • White modules on a dark background (inverted) — many scanners can't handle this
  • Light gray modules on a white background — not enough contrast
  • Yellow modules on a white background — both are "light" to a camera sensor

Rule 2: Maintain Sufficient Contrast

Your eyes might see dark blue and medium blue as clearly different, but a phone camera in dim lighting might not. The minimum contrast ratio for reliable scanning is around 4:1, and 7:1 or higher is ideal.

You can check contrast ratios with tools like the WebAIM contrast checker (designed for web accessibility, but the same math applies). Enter your foreground and background colors, and make sure you're above 4:1.

Keep in mind that the contrast on screen and the contrast on paper can differ. Colors that look vivid on your monitor might print duller, reducing the effective contrast. If you're printing, test with an actual print, not just a screen preview.

Rule 3: Don't Invert the Colors

An inverted QR code — light modules on a dark background — looks striking. It also fails to scan on a significant percentage of devices. While newer iPhone models and some Android phones can handle inverted codes, many older devices and third-party scanner apps cannot.

If your design calls for a dark background, there are better approaches than inverting the code:

  • Place the QR code inside a white or light-colored box with rounded corners
  • Add a light border (quiet zone) around the code so it sits on its own light surface
  • Use a semi-transparent light overlay behind the code area

These approaches let you keep the dark aesthetic of your design while giving the QR code the light background it needs.

Rule 4: Be Careful with Gradients and Patterns

Some QR code generators let you apply gradient colors to the modules or use patterned fills. This can look visually appealing, but it introduces risk:

  • Gradients can cause part of the code to have strong contrast while another part fades to insufficient contrast. The scanner needs the entire code to be readable, not just a portion
  • Patterns or textures inside modules can interfere with edge detection, making it harder for scanners to identify individual modules

If you want to use a gradient, keep it subtle — transitioning between two dark colors (like dark blue to dark purple) rather than from dark to light. And always test the result thoroughly.

How to Customize Colors in MQRG

MQRG lets you customize both the foreground (module) color and the background color when generating a QR code on your iPhone or iPad. You can pick from preset brand-friendly colors or enter exact hex values to match your brand palette.

The app is designed to make customization safe: you get a live preview of the code as you adjust colors, so you can see the result immediately. After customizing, scan the code right from your device to confirm it works before sharing or printing.

This workflow — customize, preview, test — takes about 30 seconds and ensures your branded QR code looks good and actually scans.

Always Test After Customizing

This is the non-negotiable step. Every time you change a QR code's colors, test it before using it. What looks fine on your screen might not scan reliably in the real world.

Here's a quick testing process:

  1. Scan on your own phone — the bare minimum
  2. Scan on a second device — preferably a different brand or older model
  3. Test in different lighting — a well-lit room and a dimmer environment
  4. If printing, test the print — screen colors and printed colors are different; a code that scans on screen might fail on paper (or vice versa)

If any test fails, increase the contrast. Go darker on the modules, lighter on the background, or both. A small adjustment is usually enough to fix borderline cases.

Color Combinations That Work Well

If you want some safe starting points for branded QR codes, these combinations are reliable:

  • Dark navy (#1a1a4e) on white — professional, high contrast
  • Dark forest green (#0d3b0d) on white or cream — earthy, clean
  • Dark burgundy (#4a0020) on white or light pink — warm, elegant
  • Charcoal (#333333) on light gray (#f0f0f0) — subtle, modern
  • Dark purple (#2d0a4e) on white — distinctive, good contrast

Avoid pastel modules, neon colors, and any combination where both colors are in the same brightness range. When in doubt, use your brand's darkest color for modules and white for the background.

TL;DR

You can change QR code colors as long as you keep dark modules on a light background with a contrast ratio of at least 4:1. Don't invert colors, be cautious with gradients, and always test after customizing. MQRG lets you customize foreground and background colors with a live preview.

Frequently Asked Questions

Can I make a QR code with white on a black background?

Technically some modern phones can scan inverted QR codes, but many devices and scanner apps still can't. For reliable scanning across all devices, keep dark modules on a light background. If your design needs a dark background, place the QR code inside a light-colored box.

What contrast ratio do I need for a colored QR code?

Aim for at least a 4:1 contrast ratio between the module color and the background color, with 7:1 being ideal. You can check this with any web accessibility contrast checker — enter your two colors and it will give you the ratio.

Can I use my brand color for a QR code?

Yes, as long as your brand color is dark enough to maintain strong contrast against a light background. Dark blues, greens, reds, and purples work well. If your brand color is light (like a bright yellow or pastel), use it for the background instead and keep the modules dark.

Ready to create your QR code?

Generate static and smart QR codes right from your iPhone or iPad.

Get MQRG on the App Store

Related Articles