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

Light/Dark theme (Day/Night mode)

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

@GitHubRulesOK

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 https://github.com/sumatrapdfreader/sumatrapdf/blob/106404f68b2bed7192338304ea038de0042cd8bb/src/Theme.cpp and attempt to add back to a current version to see how it (mis)behaves.
image

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.

@Joao
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.

Best.

1 Like

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.