In my .emacs, I am using this theme:

(add-to-list 'custom-theme-load-path "~/bin/emacs-theme")
(load-theme 'monokai t)

It works when I open emacs in a standalone window: emacs afile.c.

But when I open emacs like emacs -nw, the background is green. How can I fix the background to be the same color?


Text terminals usually do not support more than 8 background colours. You can wrap your settings into

(if window-system ...)
  • Please this in where? .emacs? – michael Feb 22 '14 at 5:49
  • @michael: Yes. You can specify the colours for the text based mode in the else part of the if. – choroba Feb 22 '14 at 8:03

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.