Change Firefox new tab background

I think this may interest others as well.

ANSWER UPDATE (as of 2020)

By now there's a lot of cool and interesting addons that do the job in great way, let me mention some of my favorite in a brief list:

  1. Firefox Color This imho is really THE DEFINITIVE ONE and A MUST HAVE! Not only it lets you deeply customize almost everything of Firefox GUI the way you like it (including new tabs background of course), it also lets you share the theme you made if you want. If this isn't enough, let me add this addon is develope by Mozilla itself.

  2. Tabliss This is a really nice one (I personally use and love it). It lets you customize the new tabs background not only choosing for a color but also beautiful background images and add widgets (like showing the time for instance). (As a last note here let me say Tabliss is like joining the features of New Tab Override, New Tab Wallpaper, Beauty Tab, New Tab Splash and Clock New Tab addons all togheter.)

  3. There are also some addons that, despite background, lets you customize tiles on new tabs as well, I think you may like it and find the thing useful so I'll provide some worth a try imho: Infinity New Tab (Pro), nightTab, New Tab Tools.

That said, if you're looking for something minimalistic there are also addons that work straight forward and provide just the very basic feature to only change the new tabs background to something dark, for example Dark New Tab or even Black New Tab ...also, if you want, you can still juggle with CSS (see point 3 of original answer below).

ORIGINAL ANSWER

So far I know a couple of addons to achieve that and a way to do without addons (as it seems a lot of them are disappearing day by day), here we go then:

  1. Customize about:newtab (please see point 3 below)

This is a specific add on for the task, it not only let's you change the background color but also choose a background image and also resize and align it as you like... nice!

  1. Stylish (please see point 3 below)

Stylish is an add on with a broader spectrum of functionality; it lets you customize Firefox itself as long as manage/install themes and skins for lots of popular websites such as Google, Facebook, YouTube and many others... I think it's overkill if you only need it for the task we are dealing with here.

  1. Neither of the above will work with Firefox 57 due to added restrictions. Stylus with Firefox 57's new tab page shows this message:

As a security precaution, the browser prohibits extensions from affecting its built-in pages (like chrome://version, the standard new tab page as of Chrome 61, about:addons, and so on) as well as other extensions' pages. Each browser also restricts access to its own extensions gallery (like Chrome Web Store or AMO).

So, let's leave addons aside and get our hands dirty!

You may decide you don't want to use an addon for this, well in this case here's what to do:

  • write about:profiles in the Firefox address bar and select Open Folder in correspondence of the "Root Directory" of the user profile you want to customize (usually there's only one);

  • by now the profile's root folder should have opened, create (if it is not present yet) a new folder named chrome;

  • create (if it is not present already) a new file named userContent.css inside the chrome folder and put the following code in it:

          @-moz-document url("about:newtab") {  
              body {
                  background-color: #000000 !important;
              }
          }
    

If you can juggle with CSS, you may also add some code to set a background image if you like (I suggest to eventually put the images in the same folder with the CSS).

You may need to restart Firefox to make customization being applied.

Credits for this last point goes to DIENER_


Open about:config and change the value browser.display.background_color to the color of your choice. I'm using #595959 (neutral gray).

This works with blank tab or "Firefox Home".

Sadly, opening tab quickly or when the browser is on heavy load will still result of a white flash.

If you don't know how to use about:config please read https://support.mozilla.org/en-US/kb/about-config-editor-firefox


Well, I must say the solution given by @danicotra does work for new tab, even with Firefox 57. However, during loading of a page, a blank flash will still systematically burn your eyes.

Here is an other proposal of content for your ~/.mozilla/firefox/xxxxxxxx.default/chrome/userContent.css, which does darken a few more places, but won't resolve the blank flash on load.

/* https://userstyles.org/styles/90565/firefox-adjust-white-flash-when-opening-new-tab */
/* https://userstyles.org/styles/142191/remove-new-tab-flash */
@-moz-document url-prefix(about:preferences), url-prefix(about:blank), url-prefix(about:newtab) {
  html, body, #newtab-customize-overlay {
    background: #303030 !important;
    color: #b2b2b2 !important;
  } 
}

@-moz-document url(chrome://browser/content/browser.xul)
{

  browser[type="content-primary"]
  {
    background: #303030 !important;
    color: #b2b2b2 !important;
  }
}

@-moz-document url(chrome://browser/content/browser.xul)
{

  browser[type="content-primary"], tabbrowser tabpanels, #appcontent > #content
  {
    background: #1B1B1B url("chrome://global/skin/media/imagedoc-darknoise.png") repeat fixed !important;
    color: #b2b2b2 !important;
  }
}

@-moz-document url(about:blank),
               url(about:preferences),
               url(about:config),
               url(about:newtab)
{
  #newtab-window,
  html,
  body, 
  #newtab-customize-overlay 
  {
    background: #1B1B1B url("chrome://global/skin/media/imagedoc-darknoise.png") repeat fixed;
    color: #b2b2b2 !important;
  }
}

html>body {
  background: #303030 !important;
  color: #b2b2b2 !important;
}