QR code dark mode fix

Dark interfaces can make QR codes look sleek, but they also create contrast traps. If the code is shown on a dark screen, inside a dark-themed app, or on a page that automatically inverts colors, you need to protect the scan field carefully.

Why dark mode breaks QR codes

The safest fix

  1. Keep the QR code itself on a dedicated light container.
  2. Use dark modules on a plain light background.
  3. Prevent theme logic from inverting the QR asset automatically.
  4. Test the code at low screen brightness and on multiple phones.
  5. Increase the code size if it will be scanned from another screen.
Dark mode can stay in the surrounding interface. The QR code does not need to match every visual theme if matching it harms scan reliability.

When this problem shows up most

Related contrast fixes

See light-background guidance Troubleshoot a failed scan