How to Invert PDF Colors for Dark Mode Night Reading Without Inverting Images
Summary
Read PDFs in dark mode at night without turning photos into negatives. Which readers recolor only text and background, which invert everything, and how to set each one up.
To get a dark PDF with photos still in their normal colors, you need a reader that recolors the text and page background instead of one that inverts the finished picture. On Windows and Mac, the dependable choice is Adobe Acrobat or Acrobat Reader with Replace Document Colors turned on. On Linux, Zathura can do it with one setting. Screen-wide invert shortcuts, most phone night modes and browser tricks flip every pixel, so photos come out as negatives.
There is one case no reader can fix: a scanned book. A scan is a photo of each page, so the text is part of the image. Any setting that keeps images untouched will also leave the scanned text black on white.

Why most dark modes turn photos into negatives
A PDF page is a list of drawing instructions: fill the page white, draw these letters in black, place this photo here. A viewer that knows which instruction is which can swap the colors of the text and the page fill and leave the photo alone. That is what Acrobat's Replace Document Colors does.
Most dark modes work later in the process. They let the page render normally, then flip every pixel of the result. Windows color filters, macOS and iOS Classic Invert, the SumatraPDF invert key and CSS filters all work this way. By then the photo is just more pixels, so its colors flip as well and skin tones turn blue-green.
Readers that keep photos in their real colors
| Option | Platform | Photos |
|---|---|---|
| Acrobat Replace Document Colors | Windows, Mac | Left in natural color |
| Zathura with recolor-reverse-video | Linux | Left in natural color |
| SumatraPDF 3.6 and earlier (invert or custom colors) | Windows | Recolored or inverted |
| Firefox forced page colors | Any desktop | Badly distorted |
| Windows color filters, Classic Invert | Windows, Mac, iPhone | Inverted |
Adobe Acrobat and Acrobat Reader (Windows and Mac)
- 1.Open Preferences with Ctrl + K on Windows or Command + K on a Mac.
- 2.Choose Accessibility in the list on the left.
- 3.Under Document Color Options, tick Replace Document Colors.
- 4.Pick Use High-Contrast colors and a combination such as white text on black, or pick Custom Color and set Page Background to a dark gray and Document Text to a light gray. Softer grays are easier on the eyes than pure black and white.
- 5.Tick Change the color of line art as well as text if charts and table borders should follow the new colors. Leave it off if you want diagrams untouched.
- 6.Click OK. The setting stays on for every PDF you open until you turn it off.
This changes only how Acrobat displays the file. The PDF itself is untouched, so printing and sharing are unaffected. If some pages refuse to change, they are almost certainly scans. Running OCR does not help here, because OCR adds an invisible text layer on top of the scan and the picture you see is still the original image.
Zathura (Linux)
Zathura's recolor mode is toggled with Ctrl + R. By default it recolors images too. Add these lines to ~/.config/zathura/zathurarc to keep images in their original colors:
set recolor true
set recolor-reverse-video true
set recolor-darkcolor "#dcdcdc"
set recolor-lightcolor "#1e1e1e"
set recolor-keephue trueHere recolor-lightcolor is what white paper becomes and recolor-darkcolor is what black text becomes. recolor-keephue keeps colored highlights and links recognizable.
SumatraPDF (Windows)
In the current stable releases, SumatraPDF's invert command and its custom TextColor and BackgroundColor settings recolor the whole rendered page, photos included. The 3.7 pre-release notes describe a new DocumentColorsFollowTheme setting with a smart mode that recolors text and background but not images. If you prefer Sumatra, check whether your version has it before relying on it.
Phones and tablets
On iPhone and iPad, Settings > Accessibility > Display & Text Size > Smart Invert leaves images it can identify, such as photos in a web page, in their normal colors. A PDF page is usually drawn as one surface, so photos inside the page often still flip. Night or dark modes in mobile PDF apps generally invert the page content as well. Open a page with a photo on it and check before a long session.
Browser viewers and the hue-rotate trick
You will often see this CSS suggested for dark PDFs in the browser: filter: invert(1) hue-rotate(180deg). The hue rotation turns colors back toward their original hue, so a red heading stays reddish. It does not save photos. Their light and dark areas are still swapped, so faces look like X-rays.
The idea of inverting the page and then inverting the images a second time does not work in PDF.js, Chrome or Edge either. These viewers paint text and photos into the same canvas, so there is no separate image element to target. Firefox's hidden pdfjs.forcePageColors preference recolors text, but users report that it ruins embedded images.
When you need a dark copy of the file itself
Viewer settings are the best choice for reading because nothing in the file changes. Sometimes, though, you need a file that is dark on its own, for an e-reader or for a viewer with no color options. Invert PDF Colours makes one in your browser without uploading it, and the text stays selectable and searchable.
Be clear about the trade-off. Its Invert and Soft dark modes work on the whole page, so photos become negatives there too. Its Sepia mode gives warm cream paper with dark text and keeps photos positive, which many people find comfortable enough for night reading on a dimmed screen.
Dark gray text on near-black is easier to read for long stretches than pure white on pure black, which can make letters look like they glow. Lower the screen brightness too: a dark page at full brightness is still a bright screen.
Frequently asked questions
Does Replace Document Colors work in the free Acrobat Reader?
Why do some pages stay white when I turn on Acrobat's dark colors?
Will a dark PDF print with a black background?
How do I turn off Windows color inversion if I switched it on by accident?
Sources & references
This article was researched and written by Nikola, drawing on the following primary sources and documentation:
Ready to try it?
All tools run entirely in your browser, no uploads, no account required.
Invert PDF Colours

