Qraft

Contrast

Contrast refers to the degree of brightness or color difference between adjacent elements. In QR codes, the contrast between dark modules and light background is one of the most critical factors for scan reliability. Camera decoders use threshold-based detection, so insufficient contrast prevents correct module boundary recognition.

While WCAG recommends a 4.5:1 contrast ratio for text, QR codes need even higher contrast. A ratio of 7:1 or above is recommended in practice. Black (#000000) on white (#FFFFFF) provides 21:1, the most reliable combination.

When creating colored QR codes for design purposes, maintaining contrast is challenging. Common mistakes include pastel-colored modules and photo or gradient backgrounds that create partial contrast failures. Always test colored QR codes on multiple smartphones before deployment.