I use Emacs within Terminal on my MacBook. I have configured Emacs to use the color-theme package. I prefer the "whateveryouwant" theme, which has a white background. Incidentally, I also have a white background in my Terminal sessions.

Now, after upgrading to Snow Leopard, my Emacs background is grey. This is annoying.

I'm running GNU Emacs 22.3.1.

How can I make my Emacs background white?

More info

The emacs background is white if I start with emacs with 'emacs -q'. When I have an .emacs that only contains this:

(add-to-list 'load-path "~/.emacs.d/color-theme/")
(require 'color-theme)

the background becomes grey.

I tried recompiling the latest version of color-theme by typing 'make', and I get this error message:


Any idea why? Seems to be that installing Snow Leopard installed a new emacs, which doesn't like color theme?

Even more info

I still have not fixed the grey background. I did fix the compile errors with these changes:

diff --git a/color-theme/themes/color-theme-example.el b/color-theme/themes/color-theme-example.el
index f73b4f6..1961a01 100644
--- a/color-theme/themes/color-theme-example.el
+++ b/color-theme/themes/color-theme-example.el
@@ -1,4 +1,5 @@
+  (add-to-list 'load-path "~/.emacs.d/color-theme/")
   (require 'color-theme))

 (defun color-theme-example ()
diff --git a/color-theme/themes/color-theme-library.el b/color-theme/themes/color-theme-library.el
index d194708..edc7d94 100644
--- a/color-theme/themes/color-theme-library.el
+++ b/color-theme/themes/color-theme-library.el
@@ -28,6 +28,7 @@

 ;; Code:
+  (add-to-list 'load-path "~/.emacs.d/color-theme/")
   (require 'color-theme))

 (defun color-theme-gnome ()

Unfortunately, I still get a grey background instead of white whenever color-theme is initialized.

  • what do you get as result when running M-: (frame-parameter nil 'background-mode)? It should be "light" and not "dark" if your background is white. – mihi Sep 18 '09 at 17:14

Adjusting the background value of the default face from "white" to "gray00" fix the issue.

You could adjust the color-theme-library.el, but I prefer to suggest to adjust your .emacs.

(add-to-list 'load-path "~/.emacs.d/color-theme/")
(require 'color-theme)
; Force background color to white for Snow Leopard
; TODO: revisit this fix when the reason why the background
; was gray is identified.
 '(default ((t (:stipple nil :background "gray00" :foreground "black"
:inverse-video nil :box nil :strike-through nil :overline nil :underline nil
:slant normal :weight normal :height 1 :width normal :family "default")))))

You could achieve a simular result by using M-x customize > Faces > Basic Faces > Default Face and setting Background to "gray00".

  • Wow, thanks! I hope the color-theme library is adjusted once the reason is identified, but for now this is excellent. I finally have my white background back! – user10934 Sep 20 '09 at 22:37
  • I'm not sure that the color-theme library need to be adjusted. I really try to identify the reason of that strange behaviour. We could assume that gray00 == white... so I suppose there is something else that interferes with the color-theme... Anyway, the goal was to make it work asap. – Christian Lemer Sep 20 '09 at 23:43

Add this to your .emacs:

(add-to-list 'default-frame-alist '(background-color . "white"))
  • This didn't help. – user10934 Sep 14 '09 at 11:42
  • Curious. Have you tried emacs -q to see if the problem is in your .emacs? – Trey Jackson Sep 14 '09 at 15:33
  • ah yes, i'll edit my question. – user10934 Sep 14 '09 at 18:25
  • Note: for me, (add-to-list 'default-frame-alist '(background-color . "gray00")) finally solved the problem. None of the above worked except for going to customize > Faces ... every single darn time – wrongusername Jan 16 '12 at 8:25

Emacs is looking for


but your theme example was written as


Try this in your init.el:

(setq color-theme-directory "/Users/gharfst/.emacs.d/color-theme")
  • This didn't solve my grey background, but it helped me solve the compile errors. I'll edit my question with the new info. – user10934 Sep 15 '09 at 17:52

Hit M-x customize then go to "faces" and then "basic faces". There you can alter the default face. The foreground and background settings are the ones you want to look at.

  • 1
    I browsed through customize, as you suggested. I see that the background is white. I see "[X] Background: white (sample)". Unfortunately, on the screen, the background is grey. – user10934 Sep 12 '09 at 17:25

Can't find documentation to support my theory, but I think Emacs is just adding the shading to stand out from the white background in Terminal. Or vice versa. I suppose you could try changing your Terminal background to Grey to see?

  • Nope -- I changed the background to black, and the emacs background is still grey. – user10934 Sep 14 '09 at 11:40

Your Answer

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