The best QR code colors are dark modules (the squares) on a light background, and yes, QR codes can be colored. The rule is simple: the modules must be clearly darker than the background. Black on white gives a 21:1 contrast ratio and is the safest choice. For a branded code, aim for at least 4:1, and use 7:1 or more for outdoor signage, where sunlight and distance lower the effective contrast. This guide gives the numbers, a color table, and a test routine.
Which QR Code Colors Work, and Can QR Codes Be Colored?
A QR code can be almost any color, and it can use different colors for the modules and the background. A phone camera does not see hue. It converts the image to grayscale and decides, square by square, what is dark and what is light. So the question is not which color you pick, but how different the two grayscale values are.
- Works: navy, dark green, charcoal, dark purple, dark brown or black modules on white, cream or another very light background.
- Works with a test: dark red, dark teal and dark orange on white. Check the ratio first, and scan a printed proof.
- Does not work: yellow, light gray, pastel or neon modules, and any pair of colors with the same brightness, such as medium green on medium red.
- Risky: light modules on a dark background (inverted codes). Many scanner apps read them, but some do not, so avoid them on anything that matters.
Why Contrast Controls QR Code Scannability
Optical sensors read QR codes by measuring the difference in reflectance between dark and light modules. The QR code standard, ISO/IEC 18004, assumes dark modules on a light background. Dark modules absorb light and the light background reflects it. If the difference is too small, the decoder cannot separate the data pattern from the background.
In barcode testing (ISO/IEC 15415), symbol contrast is the difference between the brightest and darkest reflectance in the code. A symbol contrast of 70% or more earns the top grade, and below 20% fails. Graders also check modulation, which shows how evenly the light and dark modules reflect across the whole symbol. Uneven colors or weak separation make the scanner miss module edges.
Normal polarity, with dark modules on a light background, works on every device. Some built-in phone camera apps cannot read light codes on dark backgrounds, and support differs by phone model and software version. Use normal polarity unless you have tested the inverted version on the devices your audience uses.
Evaluating Color Contrast Ratios and Thresholds
The contrast ratio is a number from 1:1 (no difference) to 21:1 (black on white). The ratio comes from the accessibility rules in the Web Content Accessibility Guidelines (WCAG), which were written for text but are a practical way to check QR colors. A contrast checker (search for "WCAG contrast checker") accepts two hex codes and returns the ratio. For more on inclusive design, read our guide on how to make QR codes ADA compliant.
Use these targets. At least 4:1 is the minimum for indoor print and screens. 7:1 or more is safer for packaging, flyers and anything photographed in varied light. 10:1 or more is the target for outdoor signage. The ratios below are approximate and depend on the exact shade.
| Color Combination | Approximate Contrast Ratio | Scannability Assessment |
|---|---|---|
| Black on White | 21:1 | Optimal (industry standard) |
| Navy Blue on Beige | ~15:1 | Excellent |
| Dark Blue on Light Yellow | ~12:1 | Very Good |
| Dark Brown on Off-White | ~8:1 | Good |
| Pure Red (#FF0000) on White | ~4:1 | Borderline, test before printing |
| Dark Red (#8B0000) on White | ~11:1 | Very Good |
| Light Gray on White | ~1.5:1 | Poor (frequent scan failures) |
| Yellow on White | ~1.1:1 | Unscannable |


Customize Codes Without Sacrificing Scannability Test colors and preview your design in real time using our QR code generator with logo to balance brand aesthetics with reliable scanning.
Best QR Code Contrast Ratio for Outdoor Signage
No standard sets a required ratio for outdoor QR codes, but outdoor conditions reduce contrast in three ways: direct sun washes out the light areas, glare hides parts of the code, and distance blurs small modules. Plan for a larger margin of safety than you would indoors.
- Use black or a very dark color on white. Aim for a ratio of 10:1 or higher.
- Print on matte material or add a matte laminate. Glossy vinyl and glass reflect the sun and break up the pattern.
- Size the code for the scan distance. A common rule is 1 unit of code width for every 10 units of distance, so a code scanned from 2 meters (about 6.5 feet) should be about 20 cm (8 inches) wide.
- Keep the full quiet zone, and put the code on a solid light panel instead of a photo.
- Avoid placing the code where it faces low sun or sits behind glass, and scan the printed sign at the actual site before ordering a full run.
Barcode Contrast: QR Codes vs Linear Barcodes
The same contrast rules apply to other high contrast barcodes, such as Code 128 or EAN. Retail scanners often use a red laser, and red light does not see red bars or red ink as dark. For linear barcodes, print bars in black, dark blue or dark green on white, and never in red or orange. QR codes read by a phone camera are less sensitive to hue, but the same advice gives the most reliable result for both.
Safeguarding the Quiet Zone and Code Dimensions
High contrast must extend to the edge of the code. The blank margin around the pattern is the quiet zone. It tells the camera where the code starts and where other artwork ends.
- Keep a quiet zone at least four module widths wide on all four sides.
- Keep this margin clear of text, illustrations and borders.
- Match the quiet zone to your light background color so the boundary is clean.
- Print codes at least 2 x 2 cm (0.8 x 0.8 inches) for close, handheld scanning. Go larger for longer links, because more data means smaller modules.
- Prefer a short link. A short URL makes a simpler pattern with bigger modules that scan better in poor light.
Text or artwork inside the quiet zone is a frequent cause of scan errors on branded materials. Our guide to best practices for QR code readability shows how to keep the margins while fitting your layout.
Avoiding Common Color and Styling Mistakes
Customizing a code can hurt readability. Cameras convert the image to grayscale, so two different hues can end up with the same brightness and merge into one gray.
- Avoid pastel modules such as baby blue, mint or pale yellow.
- Avoid bright red or orange modules. Laser scanners read red as light, and the contrast ratio is often below 5:1. A dark red such as maroon is much safer.
- Avoid gradients where the lightest part of the module color is close to the background.
- Avoid transparent backgrounds over photos, textured paper or patterned packaging. Put the code on a solid light panel.
- Avoid inverted designs with light modules on a dark background unless you have tested them on the phones your audience uses.
- Avoid large logos. A logo that covers too many modules can exceed the error correction of the code.


Knowing these limits lets you learn how to create a custom QR code that shows your brand without breaking decoding.
Testing and Validating Across Real-World Environments
A code that scans from a bright monitor can fail on paper. Room light, viewing angle and material texture all change the contrast that reaches the lens. Direct sun washes out small color differences, dim rooms reduce the sensor’s ability to separate modules, and glossy finishes add glare.
Run this check before every print job:
- Check the color pair in a contrast checker. The ratio should be at least 4:1, and 7:1 or more for packaging and outdoor use.
- Print a proof on the real material, at the real size, with the real finish.
- Scan it with the built-in camera on at least one iPhone and one Android phone, one older phone if you can, and a browser-based QR code scanner.
- Scan in the worst light the code will face: dim room, direct sun, and at an angle.
- If it hesitates, raise the contrast, enlarge the code, shorten the link or restore the quiet zone.
Our guide on how to test a QR code before printing covers this in more detail, and how to improve QR code readability covers fixes for codes that fail.
Maximizing QR Code Reliability and Engagement
Treat contrast as a technical requirement, not a finishing touch. Choose a dark color on a light background, keep the quiet zone, and test a printed proof under the light it will face. That protects your print budget from codes that do not scan.
Create your high-contrast code with our QR code generator. Set the module and background colors, and download a PNG, SVG or PDF. If you print a code and may need to change the link later, use a dynamic code: you can edit the destination after printing and see scan stats. Dynamic codes come with a 14-day free trial, and plans are listed at https://pageloot.com/pricing/.
Frequently Asked Questions
Aim for at least 4:1 between the modules and the background. Use 7:1 or more for packaging and flyers, and 10:1 or more for outdoor signage. Black on white is 21:1.
Yes. Any color works if the modules are clearly darker than the background. Deep navy, forest green, charcoal and maroon on white or cream work well. Yellow, light gray and pastels do not.
The modules and the background can be different colors, and you can use any hue, but only the brightness difference matters. A phone reads the code in grayscale, so two colors of equal brightness will fail. Check the ratio and scan a printed proof.
There is no official standard. A ratio of 10:1 or higher is a safe target, such as black on white. Use a matte finish to cut glare, size the code at about 1/10 of the scan distance, and test it on site.
Yes, if your brand color is dark enough, such as deep navy, forest green or charcoal, and sits on a uniform light background. If your brand color is light, use a dark shade of it for the modules.
The QR standard defines dark modules on a light background. Many camera apps look for that pattern first, and some cannot read light modules on a dark background. Support varies by phone, so test before you print.
Yes. Linear barcodes such as Code 128 or EAN also need dark bars on a light background. Retail laser scanners use red light, so never print the bars in red or orange.























