How to change default notebook background color?

You can SetOptions for the current notebook as:

SetOptions[EvaluationNotebook[], Background -> LightGreen]

to change the background to whatever colour you like. You can also supply an RGB colour as:

SetOptions[EvaluationNotebook[], Background -> RGBColor[0.9, 0.7, 0.7]]

Other possibilities for the first argument of SetOptions are

  • $FrontEnd which will change the background for all notebooks and last across restarting Mathematica.

  • $FrontEndSession which will change the background for all notebooks but won't be saved if you restart Mathematica.


You could create a custom stylesheet that has a different background color and define it to be the default one. To do that, go to Format | Edit Stylesheet, select All in the "Choose a style" combo box. Select the appearing entry in the list below and set your appropriate style definitions for it, in your case that would be another background color using Format | Background Color. The new window should look somewhat like this:

enter image description here

You can now select File | Save as, and save the stylesheet window notebook somewhere. To make it available in the stylesheet choosing menu (Format | Stylesheet), save it in $UserBaseDirectory/SystemFiles/FrontEnd/StyleSheets, where $UserBaseDirectory is your user directory. If you don't know where that is, simply execute $UserBaseDirectory in Mathematica and it will print its location. Once your newly created stylesheet is saved in that folder, you'll be able to select it over the menus; if it doesn't appear right away, restart the frontend.

If you want to use this as your default stylesheet, i.e. the one that is used when the program starts, go to the options inspector (Format | Options Inspector), select Global preferences at the top (see picture below), and change the value of DefaultStyleDefinitions to the path you put your stylesheet in.

enter image description here


Another option is to pull up the Format --> Option Inspector selection in the menu system, select the notebook that you're using in the upper-left, and then navigate to Notebook Options --> Display Options --> Background. The palette would let you pick the exact shade that you wish to work with. You can also see a bunch of the great options that R.M. identified in the answer above through the Option Inspector.

It's a little clunky and the SetOptions command is quicker, but it is an alternative for tinkering and playing around with to get the Notebook set up to your satisfaction.

enter image description here