Is there a built-in way in Firefox to blacken or to colour the about:blank page?

Will I maybe save some energy by doing so?


6 Answers 6


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

  • 1
    Did not work for me on Firefox 69 on Ubuntu Linux 18.04. Furthermore, as explained on kb.mozillazine.org/About:config_entries#Browser this setting can actually be changed in the regular user preference panel. Oct 8, 2019 at 12:09
  • 8
    To be more precise, this settings applies either "only to pages that don't specify a color" or "on all pages only when using a high contrast theme" or "on all pages". We don't want it "on all pages", only on new blank tab. Oct 9, 2019 at 6:51
  • 4
    This breaks the background color on pages like wolframalpha.com and many others, making them potentially unreadable. The accepted answer, or the one at gist.github.com/gmolveau/a802ded1320a7591a289fb7abd0d6c45, works correctly.
    – erb
    Jan 9, 2020 at 15:15
  • Although this will break the background for any web page without default background, when using plugins like DarkReader to make all pages dark, it can work out well.
    – Sushruth
    Jan 30, 2020 at 8:10
  • 3
    Do you know a way to do this on Google Chrome?
    – Jire
    Jun 10, 2020 at 0:04

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.

  • 4
    The disadvantage of setting the background-colour is, that especially on websites with text entry fields the background of the text will also appear in that background-colour... In other words: websites where no CSS background colour is set, the background colour is the Firefox background-colour. Makes typing/reading quite uncomfortable. So I set it back to default by deleting the userContent.css
    – leymannx
    Jul 3, 2013 at 9:20
  • 3
    Easier way to open profile folder: open "about:support" page in Firefox and click the "Profile Folder" button.
    – ciastek
    Jan 3, 2017 at 0:00
  • 3
    It works for Firefox 57 also, just chreate the chrome/userConent.css file if it doesn't exist.
    – tigerjack
    Nov 30, 2017 at 20:45
  • 1
    As far as I know, this trick no longer works on Firefox 67. Jun 5, 2019 at 20:43
  • 1
    Works fine in Firefox 76, just set toolkit.legacyUserProfileCustomizations.stylesheets to true first. Jul 2, 2020 at 17:00

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".
  • 3
    +1 This should be up voted more. In v38 of Firefox it should be about:newtab
    – L84
    May 4, 2015 at 17:32
  • That is if you wish for your new tab to be about:newtab. I set it to about:blank myself. May 4, 2015 at 18:41
  • True but my about:blank page and new tab are one and the same for me, at least with the way I use FF. =>
    – L84
    May 4, 2015 at 20:37
  • I added both about:newtab and about:blank to have all of my tab start with black background: @-moz-document url-prefix(about:newtab) {*{background-color:#000000;}} @-moz-document url-prefix(about:blank) {*{background-color:#000000;}} May 13, 2016 at 3:16
  • 1
    You can still use Stylus and write a style for about:blank and the style will work, despite the message from Stylus. You just have to go to Manage > Write > Import > [Paste in the code] Overwrite style, and name your style and save. (Firefox 68)
    – mic
    Jul 26, 2019 at 11:38

I know this is an old question, but in Firefox 64, the chrome folder doesn't exist anymore in the /Library/Application Support/Firefox/Profiles/RANDOM_TEXT.default location.

I did find a setting though under the about:config key browser.display.background_color, which you can set to any hex color code. This setting will probably save my eyes a couple dozen times a day.


  • Works great - thanks! Takes effect at the moment the about:config tab is closed.
    – jcoppens
    Jun 11, 2019 at 5:30
  • You can just create the chrome folder and the userChrome.css file. Jun 29, 2019 at 3:11
  • chrome.css is apparently going to be disabled by default in the near future, but you can re-enable it via about:config settings bugzilla.mozilla.org/show_bug.cgi?id=1541233 Aug 24, 2019 at 18:48
  • 2
    This isn't working for me on FF 68.0.2 (64-bit, Ubuntu 16.04). Aug 24, 2019 at 21:09
  • background_color is the settings mentioned in @fredthefaillord and doesn't work on recent firefox. Oct 9, 2019 at 6:53

Set browser.display.use_system_colors to true in about:config.

  • Did not work for me on Firefox 69 on Ubuntu Linux 18.04. Oct 9, 2019 at 6:54
  • 2
    Your system theme should be dark of course.
    – sergio
    Oct 10, 2019 at 10:24
  • Before writing here, I tried dark system theme with default firefox theme which follows it, then with firefox dark theme, did not work either. Thanks for mentioning this anyway. Oct 10, 2019 at 14:00

In Linux, add the following file (or append to it, if it exists):


gtk-application-prefer-dark-theme = true

(you might also find and toggle this option through your Linux distro settings manager)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .