Emacs Init: Set Color Theme

By Xah Lee. Date: . Last updated: .

Emacs support color themes since Emacs 24 (Released 2012-06)

Set a Color Theme

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

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

emacs theme tango 2022-05-23 150040
M-x customize-themes. Click to see the change immediately.

Clear Color Theme

To clear theme, Alt+x disable-theme.

Show Enabled Themes

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

Set a Color Theme in Emacs Init

put this in your Emacs Init File:

(load-theme 'tango t)

Color Theme Gallery

List of Builtin Color Themes

Alt+x customize-themes to see the list.

Set Background Color Instead of Color Theme

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.

put this 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)

Frame Parameters (ELISP Manual)

[see Emacs: Set Default Window Size]

[see Emacs Init: Setup Font]

Simple 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.

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.

Emacs Color Theme