Designing
Choose colors that scan
Keep a dark code on a light background, keep strong contrast, and use gradients carefully.
Scanners look for dark squares on a light background. Most color problems come from breaking that rule.
Change the colors
In the playground, open the Design tab, then Colors.
- Background is the area behind the code.
- Foreground colors the small squares that hold your data.
- Eyes colors the three big squares in the corners.
- Dots colors the center of each corner square.
Each color can be solid, a linear gradient or a radial gradient. The palettes under the four colors set them all at once.
Rules that keep a code scannable
- Dark code, light background. Light codes on dark backgrounds fail in some camera apps.
- Strong contrast. Aim for a contrast ratio of 4.5:1 or more between the code and the background.
- Gradients stay dark. A gradient is fine when every color in it is dark enough against the background.
- Plain background. A busy photo behind the code makes it harder to read.
Check the contrast
The contrast checker in the toolbar above the preview shows the ratio for your colors. It flags pairs under 4.5:1.
The Scan score under the preview checks contrast too, along with size, clear space and the logo. See Check a design with the scan score.
Related
Last updated on