Change the white background in webpages to another color
Become or hire the top 3% of the developers on Toptal https://topt.al/25cXVn
-------------------------------------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Mysterious Puzzle
--
Chapters
00:00 Question
01:05 Accepted answer (Score 21)
01:36 Answer 2 (Score 15)
02:21 Answer 3 (Score 11)
03:04 Answer 4 (Score 5)
03:41 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 !