DrGrizz's blog

Apr 28, 2026

Forcing dark mode in PDFs for Firefox

I’m disabled, and bright PDFs aren’t just annoying, they are painful.

My regular PDF viewer has inverted colors, so it’s fine (even if images pictures are completly off with that). But inside Firefox, even with dark mode enabled, embedded PDFs still render as bright white pages, even with dark reader and dark mode enabled.

But there is a solution

In about:config, you can input the following settings

pdfjs.forcePageColors = true
pdfjs.pageColorsBackground = #1c1c1c
pdfjs.pageColorsForeground = #eeeeee

And voilà, white text on black background, no more white glare