# Why a Dark-Mode Boarding Pass Won’t Scan

2025-12-03 · https://ibraverse.ca/tech/barcode-flight/

> Why barcode readers need a foreground-colour setting, and what happens at an airport gate when they don’t have one.


One day I was in Düsseldorf airport to take a flight. I had already checked in online and only had the barcode on my phone.

![Boarding pass barcode in dark mode: white bars on a black background](https://ibraverse.ca/tech/barcode-flight/01-boarding-pass-dark_hu_c11593739a2b4eff.webp)

When I arrived at the security checkpoint to scan my barcode, it didn’t work. I was already late. I tried every zoom, rotation… nothing.
The security guy told me I needed to go back to the check-in gate and hope they were still there to print a paper boarding pass.

But then I realised: my phone was in dark mode, and the barcode was shown with dark as foreground colour. So I just switched to light mode… and it saved me time, my flight, and a lot of stress.

![The same boarding pass barcode in light mode: black bars on a white background](https://ibraverse.ca/tech/barcode-flight/02-boarding-pass-read_hu_8deee6bdec54a8f3.webp)

A reader that assumes dark bars on a light background works everywhere except on
a phone at night, and that's where boarding passes are these days. Foreground
colour is a setting in every serious imaging library, including the
[Aurora Imaging Library](https://www.zebra.com/us/en/software/machine-vision-and-fixed-industrial-scanning-software/aurora-imaging-library.html)
I work on.

I still switch to light mode before every gate.

