Forum moved here!

Home / BackgroundColor impacts images in PDF

m04f04m

Using SumatraPDF 3.1.2 64-bit:

Is there a way to specify BackgroundColor in Advanced Options so that it only impacts text areas of the PDF? I’ve set a slightly beige (#e0dcd8) background color that works well for reading text, but it also seems to be bleeding over into any images.

GitHubRulesOK

The foreground (i.e. Textual objects) and Background (eg paper) are the boundary range used by images so altering either will always impact the image colour range.
You can make small alterations to background to reduce the “harshness” of contrast for night reading but inversion does not go down well
see

m04f04m

That’s unfortunate. I wonder how Foxit Reader does it as an option. Even works with black text on white backgrounds and with images mixed on the same page (image text is untouched).

GitHubRulesOK

Acrobat and Foxit have large teams of customer revenue paid programmers, who have impetus for developing disabled user assistive features such that contrasting text etc. can be filtered.

It is possible in PostScript based PDF files to sift out layers so styles and vector lines can each have desired attributes plus keep the image objects untouched. However that can’t be applied to a PDF with image text only pages. so the minimal requirement for all objects (image or vector glyphs etc.) is to simply invert or shrink their combined colour range.

salihfurqan

Hi there. I was changing the colors by day and night but I realized when I change TextColor, it also changes the ‘Find:’, ‘Page:’ and page numbers’ colors so when I make the text white at night, they become essentially invisible. MainWindowBackground does not change these parts. Also, TextColor does not change the main page’s texts under pdf thumbnails, that’s a problem too if I change mainwindowbackground. Thanks.

endolith

Another option is to add the inverted colors mode to the SendTo menu:

image

In C:\Users\USERNAME\AppData\Roaming\Microsoft\Windows\SendTo add a shortcut to "C:\Program Files\SumatraPDF\SumatraPDF.exe" -invert-colors
and then you can open a PDF normally or right-click and Send To SumatraPDF dark.

GitHubRulesOK

I do use multiple SendTo’s in order to open files in different versions/pre-releases, but generally don’t have any of those normally set to invert, I simply have MS 10 NightLight active in daytime :sleeping:

You can also set a registry Verb so Shift Right click on PDF offers “Open” or could offer alternative for example “Open at Night” with the -invert-colors added.

endolith

Doesn’t that just dim the screen and remove blue? PDFs with white backgrounds are still light backgrounds?

Shai

Hello,
I inverted the colors of Sumatra because the white PDFs were hurting my eyes during study sessions.
The problem is that the total number of pages (current page/total page) become invisible after I restart the software because the color is binded to the document text color.
Here is a screenshot:

Is there a better way to get a dark mode on Sumatra?
Thanks in advance.

GitHubRulesOK

You can emulate some contrast

	TextColor = #b0b0b0
	BackgroundColor = #000000

Also if your system colors are set for hi-contrast or dark mode you could tryout
UseSysColors = true
but I avoid that as too confusing

"Invert color" using the new shortcut ShiftI is invert ALL colors. same as -invert-colors or setting background to foreground

Shai

I think I will stick with the first solution you gave me. I do have dark mode activated on Win10, but SysColors true doesn’t do anything. Also, High Contrast mode looks hideous.

Thanks for the help. Maybe in future updates there will be another solution.