Change the white background in webpages to another color
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Realization
--
Chapters
00:00 Change The White Background In Webpages To Another Color
00:50 Accepted Answer Score 21
01:15 Answer 2 Score 15
01:49 Answer 3 Score 4
02:00 Answer 4 Score 11
02:35 Thank you
--
Full question
https://superuser.com/questions/181214/c...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#firefox #colors
#avk47
ACCEPTED ANSWER
Score 21
I just wrote a quick Greasemonkey script that checks the computed style of the body
element and changes it to black (you probably want to choose a different colour):
(function () {
if (window.getComputedStyle(document.body, null).getPropertyValue("background-color") == "rgb(255, 255, 255)") {
console.log("Setting new background color...");
document.body.setAttribute("style", "background-color: #000000;");
}
})();
The problem with these types of things is that unless websites are designed extremely well, there will be blotches of white on black.
ANSWER 2
Score 15
This is not a perfect solution but you can do this whenever you visit the sites you want to change the background.
In Firefox below 38, go to Tools > Options > Content
and click on Colours
button. In Firefox 38 and higher, go to Edit > Preferences > Content
and there click Colors
.
Select grey for the "Background", and clear the checkboxes near "Allow pages to choose their own colours, instead of my selections above" and "Use system colours".
ANSWER 3
Score 11
I have updated a Greasemonkey (Firefox) script to suppress white backgrounds.
The scripts will work in Chrome if you install Tampermonkey.
http://userscripts-mirror.org/scripts/show/142763
This changes all white backgrounds to gray(ish) with some shading. You can configure and set your own base colour from the generic code. Shades of white are also rendered.
I have three variants: Gray, Pink, and Green - all of which can be customized.
Search in user scripts for noWhiteBackgroundColor.
ANSWER 4
Score 4
I discover lately this firefox addon Stylish. This will do what you want & much more !