QR Code Contrast Ratio Explained
Contrast ratio measures the brightness difference between a QR code's dots and its background — a scanner needs enough of a gap to reliably tell them apart, regardless of what colors are actually chosen. A simple practical check: convert the design to grayscale mentally (or with a filter) and see if the two colors still look clearly different once color itself is stripped away.
Scanners don't perceive color the way people do when reading a QR code — they're measuring relative luminance (brightness) between adjacent regions to decide whether a given module is "on" or "off." That's why two colors that look distinct to a human eye on a calibrated monitor, like a mid-tone teal dot on a mid-tone gray background, can perform poorly under a camera, especially in imperfect real-world lighting, while a genuinely dark color on a genuinely light one performs reliably almost regardless of the specific hues involved.
The grayscale test is the fastest practical gut-check available without any special tools: most phones have a grayscale accessibility filter, or a design tool can desaturate a preview instantly. If the dots and background still read as clearly different shades of gray once color is removed, contrast is very likely sufficient. If they blur into similar gray tones, the color choice needs adjusting regardless of how good it looks in full color.
Real-world conditions make marginal contrast worse than a screen preview suggests. Print introduces slight color shift between what a monitor shows (RGB) and what ink produces (CMYK); glossy paper or lamination adds glare under certain lighting angles; a phone scanning in a dim restaurant or bright outdoor sun is working with less margin than a controlled test in even office lighting. A contrast level that just barely passes on a monitor has very little room left for those compounding real-world factors, which is why erring toward higher contrast than feels strictly necessary is the safer default.
There's no official numeric contrast ratio published in the QR specification the way there is for web accessibility standards (like WCAG's 4.5:1 text contrast rule) — QR contrast requirements are closer to a practical guideline than a hard number, since scanner hardware and software vary. The dependable rule of thumb that holds up across virtually every real device: dark, saturated foreground on a light, ideally white or near-white background (or the reverse, light on dark) reads reliably, and anything that visually reads as "medium on medium" is the pattern to avoid.
It's worth applying the same grayscale check to a logo added to the center of a code, not just the dot and background colors — a logo with its own internal color contrast that's already weak in full color will look even flatter once desaturated, which is a useful early signal that a particular logo image might be a riskier choice for the center of a code than it first appears in its original branded colors.