Skip to content

Guide

Dark mode QR codes and scanner compatibility

Modern phone cameras often read inverted QR codes, while many embedded scanners do not. Compare two approaches to dark designs and choose the appropriate option for your use case.

The QR specification defines dark modules on a light background as the standard configuration. Modern phone cameras often test both polarities and can read inverted codes. Many embedded scanners, including some implementations based on ZXing, test only the standard polarity. Ironfang Render accounts for this difference when verifying each output.

Use a light tile for broad compatibility

Place a standard dark-on-light QR code on a light tile within the dark design. The tile preserves the required quiet zone and contrast while providing broad scanner compatibility.

Place the standard QR image directly on the dark interface.

curl -X POST https://api.ironfang.uk/renderwolf/v1/qr \
  -H "Authorization: Bearer if_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "data": "https://example.com",
    "dots": "circle",
    "dark": "#05050a",
    "light": "#ffffff"
  }' --output qr-tile.png

Use inversion for controlled screens

Set invert to true to create light modules on a dark background. In this mode, dark must contain the lighter module colour and light must contain the darker background colour. The same contrast threshold applies, and Ironfang Render verifies the finished image against its negative.

Use inverted output for application screens and dashboards you control.

curl -X POST https://api.ironfang.uk/renderwolf/v1/qr \
  -H "Authorization: Bearer if_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "data": "https://example.com",
    "invert": true,
    "dark": "#fafafa",
    "light": "#05050a",
    "dots": "circle"
  }' --output qr-dark.png

Next