I have enabled the dark mode in Firefox version 76.0 as well as installed the dark reader extension. The extension allows web pages to go dark. These changes do not affect any PDFs that have been opened in Firefox.
Recording this for anyone who has this problem
Create a bookmarklet - a bookmark with the following in the location/address field
javascript:(function(){viewer.style = 'filter: grayscale(1) invert(1) sepia(1) contrast(75%)';})()
Hope this helps.
You can see it in https://pncnmnp.github.io/blogs/firefox-dark-mode.html
- Open Firefox and press
Alt
to show the top menu, then click onHelp → Troubleshooting Information
- Click the
Open Folder
button beside theProfile Folder
entry - Create a folder named
chrome
in the directory that opens - In the
chrome
folder, create a CSS file with the nameuserContent.css
- Open the
userContent.css
file and insert -
#viewerContainer > #viewer > .page > .canvasWrapper > canvas {
filter: grayscale(100%);
filter: invert(100%);
}
- On Firefox's URL bar, type
about:config
. - Search for
toolkit.legacyUserProfileCustomizations.stylesheets
and set it to true. - Restart Firefox and fire up a PDF file to see the change!