I want to use the Emacs theme billw, except with a different background colour. I have the following in my .emacs file:

(require 'color-theme)
(set-background-color "gray12")

However this doesn't seem to change the background colour on startup; I need to manually run set-background-color "gray12" in the minibuffer at the beginning of each session.

Any help with this? I tried creating my own custom theme based on the output of color-theme-print but this caused more problems than it's worth...

2 Answers 2


The color-theme-billw function internally uses the color-theme-install-frame-params function to change frame parameters. So you can change frame parameters in the same way as follows:

(require 'color-theme)
  '((background-color . "gray12")))


(color-theme-install-frame-params PARAMS)

Change frame parameters using alist PARAMETERS.

If color-theme-is-global is non-nil, all frames are modified using modify-frame-parameters and the PARAMETERS are prepended to default-frame-alist. The value of initial-frame-alist is not modified. If color-theme-is-global is nil, only the selected frame is modified. If color-theme-is-cumulative is nil, the frame parameters are restored from color-theme-original-frame-alist.

If the current frame parameters have a parameter minibuffer with value only, then the frame parameters are not installed, since this indicates a dedicated minibuffer frame.


Position your cursor ("point" in GNU Emacs parlance) where you want to set the "background". Preferably where there is no text displayed. Then enter M-x describe-face.

Emacs will tell you witch face (all that GNU Emacs can display have a "face") you are looking at. Most probably "default". Then in the bottom of the window, click on "you can customize this face".

You are now "in customize". (it is just some sort of wizard to get/set values from/to your ~/.emacs) Set the background color you want, then click on "save for future sessions".

There you have it. Now look at the bottom of your ~/.emacs, inside (custom-set-faces ...), this is your face definition.

BTW, color-theme is now somehow built-in GNU Emacs 24. I have this in my .emacs:



 '(custom-enabled-themes (quote (tango-dark)))

  • 2
    In this case, it turns out you need to do the following: (custom-set-faces `(default ((t (:background "gray13"))))) Oct 8, 2014 at 13:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.