Sumatra PDF is a PDF, ePub, MOBI, CHM, XPS, DjVu, CBZ, CBR reader for Windows

How to customise colors for Light/Dark theme (Day/Night mode)

Perfect thank you! This is good enough for me. And quicker

1 Like

I love this program, and I hate adobe reader. but I spend hrs overnight on the pc so a Night Mode would be very useful for me and many I think.

1 Like

There is a basic type of “night” mode achieved by using either an old shortcut that includes -invert-colors as shown above by ianas

OR you can change the values manually in the Advanced settings

However beware either way will also invert colours of images so people have blue faces etc.

A formal request has been raised some time ago to improve that odd behavior but no one has found the time to make such a change

Thus it is best to have two startup settings one for night reading just text and another for normal reading with images

1 Like


Thank you that worked for me, using windows 10 64bit.

Can someone point me to the commit which corresponds to this release? I’m not usually a C++ developer but this needs to be done.

That comment was about a very old experimental developer version that if I recollect attempted to modify the shade of tabs to lighter or darker same as UseSysColors it removed much of the user settings and replaced them with 3 options and suffered more problems / created more interface artifact issues than -invert-colours or keeping the advanced user settings.

You could look through the old code in sumatrapdf/Theme.cpp at 106404f68b2bed7192338304ea038de0042cd8bb · sumatrapdfreader/sumatrapdf · GitHub and attempt to add back to a current version to see how it (mis)behaves. its no different to invert so page numbers disapeared

the main difference was tabs and here the confusion is the active one on the right is similar colour to the header !

1 Like

Reading a pdf with a white background can be very tiring for the eyes, especially at night.

My Suggestions:
1º - Offer the user the possibility to create their own themes.
2nd - Possibility to change the theme without having to click on: Menu> Preferences> Advanced Options and change the color of BackgroundColor and TextColor.

Example: Change Theme: Ctrl + (1, 2, 3 or 4 depending on the number of themes created by the user in settings.txt).

Sample Themes in settings.txt

1 - morning reading theme

Theme Name = 1 (Shortcut: Ctrl + 1)
MainWindowBackground = #fffffff
TextColor = # 000000
BackgroundColor = #ffffff

2 - Midday reading theme

Theme Name = 2 (Shortcut: Ctrl + 2)
MainWindowBackground = # 606060
TextColor = # 000000
BackgroundColor = # 606060

3 - Sunset reading theme

Theme Name = 3 (Shortcut: Ctrl + 3)
MainWindowBackground = # 404040
TextColor = # 909090
BackgroundColor = # 404040

4 - Night reading theme

Theme Name = 4 (Shortcut: Ctrl + 4)
MainWindowBackground = # 202020
TextColor = # 505050
BackgroundColor = # 202020

The User would create the personalized themes, with the most comfortable colors for their reading and change the theme with: (Ctrl + 1, 2, 3, …).

Important: That the user’s personalized themes are saved, even after the user updates the version of Sumatra. It would be very bad if the user was forced to do everything again.

I don’t know if it’s possible to do it, but, I’m sure it would be a big leap for Sumatra lovers.

Your suggested combinations are what most users resort to

We can have many billions of start-up settings for any time of day but most will just need day and dimmed so I place those two on my desktop.

Daytime working well = SumatraPDF.exe

Dimmed mode works well = SumatraPDF.exe -appdata OtherSettings

 FixedPageUI [
    	TextColor = #000000

with BackgroundColor = #808080

I also have a 3rd shortcut
Darkest Mode (no good, just for testing b/w inversion) = sumatrapdf.exe -invert-colors

You can see from the post directly above yours there was already 3 theme support and it was dropped because it did not work well enough

One bad shortcut with two working ones is better than having two bad modes

Hi everyone,

Although SumatraPDF does not have still a proper “dark mode” (or “night mode”), this feature can be easily implemented through advanced settings. For example, I implemented my own dark mode scheme by replacing the standard configurations in the FixedPageUI settings as follows:

FixedPageUI [
TextColor = #c0c0c0
BackgroundColor = #191919
SelectionColor = #9f8f53
WindowMargin = 2 4 2 4
PageSpacing = 4 4
GradientColors = #333333

I am using this dark mode configuration by about one year and I am very comfortable with it. I think it should be easy to implement different color schemes (including dark color scheme as the above one) in a menu entry of SumatraPDF. It would be nice if this feature were made available in the future versions of SumatraPDF.



Disscussion on why multiple colour choices is constantly a problem to resolve can be followed at

and many many others

Can I change the color of tabs?

Hi, can we please have dark mode? Thanks

Hello, I’m trying to implement dark mode on sumatraPDF but I’m having trouble changing the font color for the bookmarks and the highlighted area in the following image:

Is this possible through configs alone in windows 10 or is it necessary to change the source code?

Not an easy task, so many often changing locations for color plus those areas are controlled by Windows and image colour inversion is the main issue when you reverse contrast.

Could you add themes in daily Sumatra builds?

Is it possible to have dark mode without inverting images? Especially images with people look terrible.

Hi All,

I’m new to this forum & also new to Sumatra Reader. Just wondering if anyone knows of a way to have dark mode without also inverting the images too? I can see that this has already been requested, but there doesn’t seem to have been a response that I can find.

Just to be clear
There is currently NO colour “modes” in SumatraPDF other than 100% inversion used mainly for viewing negatives or blueprints.
Anyone with C++ skills is more than welcome to provide attempts at theming as linked to above. (However those who tried found it is not an easy task to meet every users suggestion for headings, text, dialogs, tabs, scrollbars etc. and still work within windows theming/high contrast modes)

Thanks for replying :slight_smile:

So do you mean that the developer(s) of Sumatra won’t be looking to make this change themselves?

I mean it is ok if they aren’t, it’s just that I may need to look for another pdf reader that has dark mode & doesn’t invert images if this is the case.

There were means to use system colours in earlier versions of windows with SumatraPDF but its not top of the one developer long list of priorities.
Most of those methods no longer easily work/available in windows 10 nor do they function well when using recent SumatraPDF, here is the result using contrast settings.

Documents foreground and background can still hysterically be changed and with pre-release there is also gradientcolors= working but that’s about it for the present unless using windows theming apps.