QR Code Contrast Checker
Enter the color of your code and the color behind it. You get the contrast ratio, a plain verdict, and a sample code in those colors to try with a phone.
Contrast ratio
17.77 : 1
Good contrast.
The generator uses your code color on a white or transparent background.
Sample code in your colors. Point a phone camera at it to see how it scans on this screen.
Why contrast decides whether a code scans
A camera does not see a QR code the way you do. It turns the picture into light and dark, then looks for the pattern. If the code color and the background are close in brightness, some squares fall on the wrong side of that split and the pattern breaks. Hue does not help: red on green looks vivid to a person and nearly flat to a scanner, because the two can be equally bright.
That is why a black code on white paper works everywhere, and why trouble starts when a brand color replaces the black. The question is never whether the color is nice. It is whether the color is dark enough against what sits behind it.
How to read the ratio
The ratio compares the brightness of the two colors, from 1 to 1 for identical colors up to 21 to 1 for black on white. It uses the same formula that accessibility guidelines use for text, which tracks how bright a color appears rather than how it is mixed.
| Ratio | Verdict here | What to do |
|---|---|---|
| 4.5 to 1 or more | Good contrast | Suitable for most uses. Still print a proof. |
| 3 to 1 up to 4.5 to 1 | Borderline | May work on a bright screen and fail in dim light or on paper. Darken the code color if you can. |
| Below 3 to 1 | Too low | Choose a darker code color or a lighter background. |
These bands are a practical guide, not a standard for QR codes, and no ratio guarantees a scan. Paper, ink, lighting, distance, and the phone all play a part. Use the ratio to rule out colors that are clearly too weak, then test the real print.
Dark code on a light background
Keep the code darker than the background. QR codes were designed that way, and every scanner expects it. A light code on a dark background, often called an inverted code, is read by many current phone cameras but not by every scanner app or older device. If your design is dark, the safe approach is a light box behind a dark code rather than a light code on the dark area.
The checker tells you when the code is lighter than the background, and the Swap colors button reverses them so you can compare.
Choosing a brand color that works
- Dark blues, greens, purples, browns, and deep reds usually pass on white. Check them here before you commit.
- Yellow, orange, light gray, pastel colors, and most light blues fail on white, even when they look strong on a screen.
- If the brand color is too light, use it for the frame, the call to action, or the logo, and keep the code itself dark.
- A tinted background is fine if it stays light. Cream, pale gray, or a soft brand tint behind a dark code keeps the ratio high.
- Avoid gradients that end in a light color. The lightest part of the code sets the limit, not the average.
- Do not place a code directly on a photo. Put a plain light panel behind it, with an empty border on every side.
Screen colors and printed colors
The ratio is calculated from the colors you enter, which describe a screen. Print is less forgiving. Ink soaks into uncoated paper and looks lighter, a dark color can lose depth on recycled stock, and a glossy laminate adds glare that washes out the dark squares under shop lighting.
Leave a margin for that. A color that only just reaches 4.5 to 1 on screen can land below it on paper. If you are near the line, darken the code color a little, or ask the printer for a proof on the actual material and scan it from the distance people will stand.
The sample code beside the checker shows your two colors on this screen. Pointing a phone at it is a quick first test, but it is a test of a bright, backlit display, which is the easiest case.
Questions people ask
What contrast does a QR code need?
There is no single official number. As a practical guide, aim for a ratio of 4.5 to 1 or more between the code and the background, treat 3 to 4.5 as risky, and avoid anything lower.
Can a QR code be a color other than black?
Yes, as long as the color is dark enough against the background. Dark blue, green, purple, or red on white usually works. Light colors such as yellow do not.
Can I use a white QR code on a dark background?
Many current phone cameras read it, but some scanner apps and older devices do not. A dark code on a light panel is the safer design.
Does a transparent background affect contrast?
The code then sits on whatever is behind it in your design. Check the code color against that color, and avoid placing it on photos or patterns.
Is this the same contrast formula used for text?
Yes. It is the relative luminance ratio from web accessibility guidelines. Here it is used as a guide for scanners, not as a rule for readable text.
Does a good ratio guarantee the code will scan?
No. It rules out colors that are too close. Size, print quality, lighting, and distance also matter, so test a printed proof.
Other QR code types
- URL
- WiFi
- vCard
- Text
- Phone
- SMS
- Location
- Event
- YouTube
- Business card
- Google review
- Google Form
- QR code with logo
- Image to QR
- PDF to QR
- Restaurant menu
- Wedding
- eSIM activation
- Recurring event
- Matter device
- Notion page
- eBay store
- QR code reader
- QR code validator
- Print size calculator
- UTM QR code
- Transparent QR code