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?

14 Answers 14


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

  • 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
    Commented Nov 14, 2020 at 12:22

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


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


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, navigate to the Settings either from the menu bar (Skim -> Settings) or by pressing CMD + .. In the settings there is a tab called Display, make sure that Invert colors in Dark Mode is selected. Now, whenever macOS is in dark mode, Skim displays its UI and the PDF itself in dark colours. enter image description here

  • Doesn't seem to work for image-based PDFs (e.g. scans).
    – Ariel
    Commented 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
    Commented Nov 27, 2018 at 14:11
  • Not working for latest version(1.5.8)
    – gpanda
    Commented 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
    Commented May 11, 2020 at 19:23
  • 1
    The comments here are about the original answer, that talked about using an AppleScript hack, that is no longer working or necessary. Someone completely changed the answer. Skim now fully supports this from its settings, for all PDFs including image-based PDFs, on all supported macOS versions. Commented Mar 13, 2023 at 13:04

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
    Commented 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
    Commented 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
    Commented 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
    Commented 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.

  • 1
    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
    Commented 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
    Commented 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
    Commented 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
    Commented 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
    Commented Nov 15, 2020 at 11:13

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
    Commented 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.)


PDF Reader X has this dark mode feature for free, at View > Scheme > Dark.


Here's a neat solution by u/krilldagger on reddit.

Basically, use the Automater built-in app in macOS, then create a workflow with the following steps:

  1. Ask for Finder Items
  2. Render PDF Pages as Images
  3. Apply Quartz Composition Filter to Image Files (Select "Color Invert")
  4. New PDF from Images

File size will be quite large (like a few hundred MB for a book) but the colors will be inverted and you can read it using Preview, without Skim or Adobe reader

Note, it may ask you to insert a "copy files" action. Just delete that, it will generate extra jpegs that stick around, so is useless.

You must log in to answer this question.

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