How to make the about:blank page black or any other color in Firefox?

Under about:config, change browser.display.background_color from #ffffff to whatever hex value you want.

Changing screen space to a dark color (preferably black) will ONLY make a power difference when using AMOLED screens, most commonly found on phones. So if you're using a regular LCD, TFT or, IPS display, you won't see any battery life improvements, but your browser will be swagged out


Yes you can change the color. As explained here you should

  1. Windows: go to %appdata%/mozilla/firefox/profiles and open the folder in there.

    On Linux the equivalent is ~/.mozilla/firefox/RANDOM_TEXT.default/

    On OSX it is /Library/Application Support/Firefox/Profiles/RANDOM_TEXT.default

  2. look for the chrome folder. In that folder, find userContent-example.css and rename it to userContent.css.

    The folder and file may not be there yet with newer Firefox versions. If so, simply create them manually.

  3. Add this line to the file

    @-moz-document url-prefix(about:blank) {*{background-color:#000000;}}
    

As to whether it will save energy, probably not:

On LCD displays, color may confer no benefit at all. In response to my inquiry, Steve Ryan, program manager for Energy Star’s power-management program, asked consulting firm Cadmus Group to run a quick test by loading Blackle, Google and the Web site of the New York Times (which is, like Google, mostly white on-screen) on two monitors — one CRT, one LCD — and connecting a power meter to both. “We found that the color on screen mattered very little to the energy color consumption of the LCD monitor,” said David Korn, principal at Cadmus, which specializes in energy and environment, and does work for the government. The changes were so slight as to be within the margin of error for the power meter. Tweaking brightness and contrast and settings had a bigger effect. The bulkier CRT screen did see savings with Blackle of between 5% and 20%. Mr. Korn emphasized that this was a quick test, not a rigorous study.


If you have Stylus extension installed, just create a new style with this exact code:

@-moz-document url-prefix(about:blank) {*{background-color:#000000;}}

credit goes to terdon's answer


Update: Apparently, what Stylus says in its message about how this no longer works on special pages like about:blank, it actually still totally does! To add a script, you have to use the workaround proposed by mic in comments:

  • Open the Manage page of Stylus with the list of all scripts you have;
  • Press "Write new style" button;
  • Under the large "Mozilla format" header press the "Import" button, and a popup with a textbox will open, paste the entire script from this post into it, and press "overwrite style"
  • Don't forget to add a descriptive name for the script in the top left textbox;
  • Press "Save".

Tags:

Firefox