QR Barcode Studio

Design

Colored QR Codes: Contrast Rules So They Still Scan

Use brand colors and gradients in QR codes without breaking them. Contrast ratios, colors to avoid, background rules and testing tips.

· 2 min read

Color makes a QR code feel like part of your brand. It works well as long as you follow a few rules.

Rule 1: dark code, light background

Scanners look for dark modules on a light background. Inverted codes (light on dark) fail on many phones and most older scanners.

Rule 2: enough contrast

Aim for a contrast ratio of at least 4.5:1 between code and background, the same standard used for readable text on the web. The preview shows the ratio for your colors.

Rule 3: careful with gradients

Both ends of a gradient must stay dark. A navy-to-teal gradient works; a navy-to-yellow one fades out where it gets light.

Colors that cause trouble

  • Yellow, light pink, pastel green and light gray codes.
  • Red on barcodes for laser scanners (they can't see red).
  • Busy photo backgrounds behind the code.

Test it

The live scan test decodes your exact design. If it turns red, darken the code color or lighten the background.

Contrast ratio of code colors on a white background
4.5:1 targetBlack21:1Navy10.1:1Forest9.4:1Brick red6.6:1Mid gray3.5:1Light gray1.7:1Yellow1.6:1

WCAG relative-luminance contrast formula. Bars under the line are risky for scanning.

Make it yourself in under a minute

  1. Open the generator

    The Custom QR code generator opens with the right content type already selected.

  2. Fill in the content

    Enter the link, network, contact or message. The preview updates instantly.

  3. Brand it (optional)

    Add your logo and colors. The scan test checks every change.

  4. Download and print

    Black codes download free as PNG. Use SVG for print with a paid plan.

Custom QR code generator →
Example result: a scannable Custom QR code generator output
End result. A real, scannable example made with the generator. Yours will hold your own content.

Quick answers

What is the best color for a QR code?

Any dark color on a light background: black, navy, dark green, deep purple or dark red on white all scan well.

Keep reading