When a PDF is opened, its actual background color is often white. On Windows, several PDF viewers have the ability to set the background color to another one, which doesn't modify the PDF file itself. You can just think that it adds a virtual color when a file is opened by those software. But when you open the same file by other softwares, it still has white background.

I often need to read many articles (PDF format) a day, and white background make my eyes feel uncomfortable.

Does Preview have the same feature? Or any plugin to do this?

12 Answers 12


So Preview does not have this feature, but more on that in a moment.

Adobe Reader for Mac does support this. Once you install the 400MB app, you can change the background colour in Preferences (⌘ cmd + ,) > * Accessibility** . Check Replace Document Colours, and set the right colours you want.

screenshot of Adobe Reader accessibility preferences

Sidenote: f.lux

I would strongly recommend you take a look at f.lux, especially if you would like your computer to be as eye-friendly as possible (which, by the nature of the question, seems likely).

f.lux makes your computer screen look like the room you're in, all the time. When the sun sets, it makes your computer look like your indoor lights. In the morning, it makes things look like sunlight again.

f.lux will adjust (you can modify the strength) the colour of the whole screen to make it easier on your eyes. You can set it to be on all the time, or automatically come on at night time. People love it.

  • 1
    the mention of f.lux is a distraction -- at least I could find no way to see white text on a black background -- which is what the original question asks for. The solution offered (Acrobat) may work, but at the price of loading a hefty piece of software that many do not like. Besides, the original question is specifically asking about using Preview.
    – Tony M
    Nov 14, 2020 at 12:22

I just found a really cool inverted pdf app on github: https://github.com/eleloya/NightPDF

Preview:enter image description here

As the repo now is read only, I did some changes in a forked repo.

  • Change default color
  • Change the deault window size to (1000, 1300)
  • Add close window shortcut (CMD + W)

You can download it here: https://github.com/yueyericardo/NightPDF/releases/tag/v0.2.1.5

enter image description here

  • cool, works for me, redeye-mode is wonderful
    – Lonely
    Nov 14, 2021 at 12:31

You can change the background color in Skim (a popular and lightweight app for viewing, highlighting, annotating, and editing PDFs). Open up your document in Skim, then open up the (Apple) Script Editor (search script in the spotlight search), paste the following script in there and run it:

tell application "Skim"
    set theColor to choose color
    set page background color to theColor
end tell

This opens up the Skim color chooser from which you can choose your desired background color. Unfortunately the changes are not persistant. So for easier changes in future, save the script (the Script Editor's default saving location is iCloud), and then for subsequent changes all you have to do is to open the scirpt editor, double click the script, and run it. See Here for more details.

Please note that if you change the background color using the Skim UI, only the surrounding color changes, rather than the document's background color.

  • Doesn't seem to work for image-based PDFs (e.g. scans).
    – Ariel
    Apr 2, 2018 at 8:50
  • 2
    Not working for me with current version (Skim Version 1.4.38)... Did work with a previous version, though.
    – Neal Young
    Nov 27, 2018 at 14:11
  • Not working for latest version(1.5.8)
    – gpanda
    May 11, 2020 at 19:14
  • 1
    sourceforge.net/p/skim-app/feature-requests/1371 As the maintainer said, "You cannot do this (Apple script) anymore because Apple has made it impossible on Sierra".
    – gpanda
    May 11, 2020 at 19:23

A simple workaround to change the background color in Skim is to (ab)use the reading bar preferences:

  • Go to Preferences/Display in the app
  • Find the reading bar preferences
  • Select the desired color and opacity (50-80% depending on the color)
  • Tick the Invert Bar box


All this does is add a layer of color over the top of the pdf. So adjusting the opacity is the key. At 100% the document is completely hidden; at 30% the trick has little effect. Here's an example that gives Skim a solarized feel (Hex color = #B68A00, opacity = 50%).


If you never use the reading bar for its intended purpose, this workaround won't interfere with your usual use of the app. Two advantages of this approach are

  1. Easy to toggle on/off using cmd + shift + b
  2. Fast to change the color from a "dark mode" to a "light mode" and back

One word of caution: Inverting the reading bar makes the whole document your desired color and the reading bar an awful glaring white. It's advisable to minimize the size (height) of the reading bar and tuck it somewhere out of the way. Here's an example in "dark mode" (Hex color = #002B37, opacity = 75%).

dark mode Skim hack with reading line

  • This adds a color over everything, though, including the text.
    – Adam_G
    Jun 25, 2021 at 19:31
  • @Adam_G: Yes, I mention that this will add a color over everything in the first sentence after the bullet list. But Skim gives you the option to adjust the opacity of the overlay. And this allows you to fine tune the balance between text and color overlay.
    – Aaron Dall
    Jul 1, 2021 at 11:27
  • I understand. But either way you’re going to end up with either dimmed text or a non-colored background.
    – Adam_G
    Jul 1, 2021 at 11:33
  • @Adam_G: That's true. But even taking a relatively dark foreground with high opacity (as in the last example in my answer) doesn't effect readability much – at least not for me. Is it difficult to make out the text in the examples I posted?
    – Aaron Dall
    Jul 1, 2021 at 11:44

Here's what I do, no coding, no plug in.

Click on tools, select annotation, then mask.

You should see a grey frame now. Adjust the size of the frame to let the gray area cover the whole page. You do have to repeat this step for each page in the document.


npm i -g serve && serve, open file in Chrome from http://localhost:5000, Chrome extension Dark Reader > enable dark for this domain


Here is a work around for those who want to use Preview:

  1. In Preview, File>Export>TIFF
  2. View>Show Markup Toolbar
  3. In the Adjust Color Tool, switch the outer handles as shown in the animated .gif below
  4. repeat for each page then File>Export>PDF enter image description here

Here's a workaround for a large number of pages, but it involves using ffmpeg and Automator

  1. Use QuickTime to make a screen recording (m.mov) of the white background pdf while clicking from page to page at, say 2 pages every second
  2. ffmpeg -i m.mov -vf negate neg.mov
  3. ffmpeg -i neg.mov -r 2.0 sub/%03d.jpg
  4. select all .jpg's in the sub folder, right click and choose the Automator action shown below to make a new PDF

The first ffmpeg command inverts the colors of the screen recording and the second ffmpeg command places images from the screen recording into a sub folder at the rate of 2 per second. Converting the resulting images into a PDF is done with a very simple Automator action, shown below:

enter image description here

The above do not preserve text, but produce images. If you want text and are okay with using something other than Preview, then the free version of PDF Expert described here is a good solution.

  • While this technically 'works', it's a terrible idea. You lose all text and PDF metadata, and the file size will increase massively. Plus the degradation of vector images to bitmap. Oh, and if I want to change the colour...? It would be far simpler just to apply a Quartz Filter to the PDF.
    – benwiggy
    Nov 14, 2020 at 12:00
  • If you want text, see the link I provide at the end. Regarding file size, a 13 page pdf I used for testing went from .4 to 1.4MB with virtually no quality loss. Quality can be controlled at the steps where you convert to images.
    – Tony M
    Nov 14, 2020 at 12:04
  • So only a 3.5 x increase, then! There are easier ways to tint a PDF without converting to bitmaps.
    – benwiggy
    Nov 14, 2020 at 12:08
  • I like Tony’s answer more because it taught me a trick I hadn’t seen +1. I get the drawbacks @benwiggy mentions, but this is a very useful technique - even more so when we understand what it strips. Sometimes I want to flatten a file so I can OCR. “Simple” and “apply a quartz filter” aren’t synonymous for me yet... also, this is a moderately “heavy” solution if the intent is only to view a PDF and not actually transform it. It’s a super clear explanation how to chain tools together.
    – bmike
    Nov 14, 2020 at 12:34
  • @benwiggy please show us how to apply your method, which you describe as a "far simpler just to apply a Quartz Filter to the PDF". Like bmike, I also don't know how to do this, so please provide step by step detail. Thanks.
    – Tony M
    Nov 15, 2020 at 11:13

Skim now (as of version 1.6.6) has a dark mode option! See the preferences for the option to invert colors.


A more simple way to do it.

  • Open Terminal
  • copy and paste defaults write -app skim SKPageBackgroundColor -array 0.78 0.93 0.80 1
  • reopen Skim

At least on El Captain (or even earlier release):

  1. Open Preview > Preference
  2. General > Windows background
  • 5
    I think that changes the background of the window, not the document itself.
    – tvk
    Sep 12, 2016 at 23:56

Inverting PDFs, adding sepia, or both is straightforward in the LaTeX workshop extension for VS Code.

Edit your settings.json, for example

"latex-workshop.view.pdf.invert": 0.9,
"latex-workshop.view.pdf.invertMode.sepia": 0.2

VS code (link) or, alternatively, Codium (link). See related issue here.

Even if you're not a developer, VS Code is great for keeping notes, working in a directory of your choice, and has markdown preview extensions available. Great alternative to Ulysses imho.



It's free and open source, and it lets you change the background colour of a pdf (the default is light grey, but I use a darker grey; I find this is actually easier on the eyes than inverting the pdf). The setting applies across sessions so you don't have to redo it every time, and you can set multiple themes to toggle between easily.

Only downside is that it doesn't work for pdfs that are scans/pictures.

(It's technically software for LaTeX/typesetting, but you can just ignore all that and use it as a pdf reader only.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .