On this page

To check QR code contrast before printing, compare the color of the code’s modules with the background directly behind them, then inspect the design in grayscale. Use the result to guide your color choices, but make the final decision by scanning a printed sample at its intended size and in the lighting where it will be used.
A contrast ratio is useful context, not a guarantee that every scanner will read the finished code. Printing can change how the design appears, so allow time to adjust the artwork and test another sample if needed.
Identify the two colors to compare
Start with the finished design, or the version closest to what you intend to print. Identify the color used for the small squares or other marks that make up the QR pattern: these are the modules. Then identify the background color immediately behind and around the pattern. The comparison should use those two colors, rather than colors from a nearby border, logo, or page decoration.
If you have an editable design, inspect the color settings for the modules and their background. Record the values shown, along with which value belongs to which part. If the code was supplied as a finished image, check whether the person or service that created it can provide the colors. You can also use a color picker, if one is available to you, to inspect representative areas of the image. Check what format it gives you and whether your chosen contrast checker can accept that format.
When selecting a point to inspect, choose an area clearly inside a module and another clearly inside the background. Avoid selecting a boundary between them, where the displayed color may not represent either intended color. If the image sits over another design element, make sure you are checking the background that will actually appear behind the code in the final artwork.
What if the color changes across the code?
A gradient does not have just one module color or one background color. Note several representative areas, especially places where the modules and background appear closest in brightness. Compare the local module and background colors at each of those areas. A strong-looking corner should not stand in for a weaker part of the same code.
Also check which way the design is arranged. Dark modules on a light background are a straightforward starting point. If your design uses light modules on a dark background, keep that fact in mind throughout the checks: a contrast result alone will not establish how well the inverted code scans.
Check and interpret the contrast
Open a contrast checker and enter the module color and background color using the inputs it supports. Before relying on a result, check the tool’s own instructions: input formats, controls, and output labels can differ. If it requires a format you do not have, obtain the values in a supported format rather than guessing. Keep a note of the colors and the result so you can compare them with any revision.
Contrast ratios use relative luminance to describe the separation between colors. A checker can help you compare candidate combinations, but treat its result as a screening aid rather than a scan certificate. A benchmark reported an approximately 2:1 worst-case contrast floor for 95% success under its tested conditions. That figure does not establish a universal passing ratio for printed QR codes.
The same benchmark found different worst-case decode rates among color pairs with nominally matched WCAG contrast ratios. In practical terms, two combinations with the same reported ratio can still perform differently. If you are choosing between designs, use the ratio to identify combinations worth investigating, then test the actual code. Do not assume that matching a number reproduces the benchmark’s result.
Compare the weakest areas
For a gradient, run separate comparisons for the representative local color pairs you identified. Pay attention to the area with the least separation and consider changing the gradient or background there. If you revise the colors, record the new values and check them again; the previous result describes the previous design.
For light modules on a dark background, the ratio still describes the two colors, but it does not settle the separate question of whether a scanner can decode the inverted pattern. In the benchmark, two of four tested decoders read inverted codes at a 0% rate. Consider switching to dark modules on a light background, particularly if the design needs to work for a broad audience, and test whichever version you plan to print.
If a checker presents a label or recommendation alongside its number, read what that label applies to. A result intended for another purpose should not be treated as a promise about your printed code.
Inspect the code in grayscale
Next, view the code and its immediate background in grayscale. Use a design or image-viewing tool that lets you make a grayscale preview or a separate copy, and follow that tool’s instructions. Keep your original color artwork so you can return to it for printing.
Look at the entire pattern, not just an isolated pair of swatches. Can you readily distinguish the modules from the background across the code? If parts of the pattern appear to blend into the background, mark those areas for revision. Grayscale inspection is an additional check recommended in the benchmark article; it does not replace a contrast comparison or a scan test.
Gradients deserve a closer look. Inspect the transition from one side of the code to the other and identify where separation looks weakest. A gradient might appear distinct at one end while another area is much harder to distinguish. Compare the colors in that weaker area, adjust the design, and inspect the revised version again. If the background also changes, evaluate the modules against the background immediately next to them at each point.
For an inverted design, grayscale can help you see whether the light modules remain distinct from the dark background, but it cannot establish decoder compatibility. A visually clear inverted pattern can still require a different design if the intended scanning tests are unreliable.
If you cannot make a grayscale preview, ask whoever prepares the artwork to provide one, or use an available tool that supports it. Compare the preview with the final color design to make sure you are inspecting the same code, scale, and background. Once the separation looks clear, proceed to a physical sample rather than treating the preview as the final approval.
Print and scan a sample
Print the finished code at the size you intend people to use, on a sample representative of the final piece. Include the actual colors and background, and use the planned printing method and material if they are available. A larger proof or a code printed on a different surface may be useful during design, but it is not a substitute for checking the intended version.
The benchmark did not measure physical print factors such as ink spread, substrate, and illumination. That makes a physical test especially useful: the screen comparison cannot tell you how your particular printed result will perform. Inspect the sample to see whether the pattern and background remain distinct, then scan it under lighting representative of where it will be used.
Make the test practical
Place the sample where a reader would encounter it, if possible, and try scanning from a comfortable position. Use the devices and scanning apps you expect your audience to use when those are available. Try more than one scan and, where practical, more than one device. Check that a successful scan leads to the intended destination or action, not merely that something is detected.
If the code will appear in more than one setting, test a representative sample in each relevant lighting condition. For example, a design intended for both an indoor handout and an outdoor display deserves a check in conditions representative of each. Record the printed size, material, colors, lighting, and devices used, along with what happened. Those notes make it easier to compare a revised sample with the first one.
If the sample does not scan reliably
Start by checking that the printed sample matches the artwork you evaluated. Look for areas where the modules and background have become difficult to distinguish, especially at the weakest part of a gradient. Consider increasing the visual separation between the two colors, simplifying the gradient, or changing an inverted design to dark modules on a light background.
If the intended size is making the test difficult, consider whether the design can accommodate a larger code. Make one change at a time when practical, so you can see which revision helps. Recheck the revised colors, inspect the revised code in grayscale, and print another sample at the size and under the conditions you actually plan to use.
Repeat the scans and keep the version that performs reliably in your own test conditions. If the code still fails, ask the artwork or printing provider to inspect the finished file and sample before proceeding with the full run.