Emacs: Set Color Theme

By Xah Lee. Date: . Last updated: .

Here's how to set emacs to use color themes. (new in Emacs 24 (released 2012-06))

Alt+x customize-themes to set a color theme.

emacs customize-themes 2015-11-13
emacs M-x customize-themes. Click to see the change immediately.

Alternatively, Alt+x load-theme, then press Tab to show a list of available themes.

To clear theme, Alt+x disable-theme. Press Tab for completion.

To find enabled themes, Alt+x describe-variable then type custom-enabled-themes

emacs color theme misterioso 2012-10-12-2
emacs color theme “misterioso”

Set a Color Theme Permanently

To set it permanently, put this in your emacs init file.

(load-theme 'misterioso)

Here's list of emacs 24.3 themes.

2012-10-11 Thanks to • Gabriel Saldaña [https://twitter.com/gabrielsaldana] • Torsten Wagner [https://plus.google.com/b/113859563190964307534/102520135125330850042/posts] • Steve Purcell [https://github.com/purcell] for tips.

Simple Setting of Background Color

Sometimes a color theme is too much. All you need is a mild background color.

To set background color, Alt+x set-background-color then type “honeydew”.

Alt+x list-colors-display to see color names.

For permanent setup, put the following in your emacs init file.

(if (display-graphic-p)
    (setq initial-frame-alist
            (tool-bar-lines . 0)
            (width . 106)
            (height . 60)
            (background-color . "honeydew")
            (left . 50)
            (top . 50)))
  (setq initial-frame-alist '( (tool-bar-lines . 0))))

(setq default-frame-alist initial-frame-alist)

(info "(elisp) Frame Parameters")

[see Emacs: Set Default Window Size]

[see Emacs: Font Setup]

Simple White on Black, Reverse Video

emacs --reverse-video 2015-11-13
emacs started with emacs --reverse-video

In terminal, emacs --reverse-video will start emacs with white text on black background. This is useful under bright sunlight.

Emacs Customization

  1. Emacs init file
  2. Install Packages
  3. Install Package Manually
  4. Define Keys
  5. M-x customize
  6. What's Major Mode?
  7. What's Minor Mode?
  8. Set File to Open in a Major Mode
  9. Organize Init File
  10. Byte Compile Elisp
  11. What's Hook?
  12. Environment Variables in Emacs
  13. Set Default Window Size
  14. Font Setup
  15. Set Color Theme
  16. Turn Off Auto Backup
  17. Check OS, Version, Host Name
  18. Check Defined/Loaded

If you have a question, put $5 at patreon and message me.
Or Buy Xah Emacs Tutorial
Or buy a nice keyboard: Best Keyboards for Emacs


Emacs Lisp