Emacs: How to Set a Color Theme

Buy Xah Emacs Tutorial. Master emacs benefits for life.
, , …,

This page shows you how to set emacs to use color themes.

Simple Setting of Background Color

You can set the background color. For example, call set-background-color then type “honeydew”.

Call list-colors-display to see available colors.

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

;; set background of current window (emacs's “frame”) to pale tinge
(set-background-color "honeydew")
;; first window settings
(setq initial-frame-alist
      '(
        (width . 92)
        (height . 54)
        (background-color . "honeydew")
        ) )

;; default window settings
(setq default-frame-alist
      '((menu-bar-lines . 1)
        (left-fringe)
        (right-fringe)
        (tool-bar-lines . 0)
        (width . 92)
        (height . 52)
        (background-color . "#eeeedd")
        ))

(info "(elisp) Frame Parameters")

〔➤ Emacs: How to List & Set Font

Simple White on Black, Reverse Video

Sometimes, under bright sunlight, it's better to have black background. You can start emacs with emacs --reverse-video.

Emacs 24 Color Themes

Emacs 24 comes with color themes. To activate, call load-theme, then press Tab ↹ to show a list of available themes.

You can also call customize-themes.

To clear theme, call disable-theme.

Here's list of emacs 24.3 themes.

adwaita
deeper-blue
dichromacy
light-blue
manoj-dark
misterioso
tango
tango-dark
tsdh-dark
tsdh-light
wheatgrass
whiteboard
wombat
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)

Thanks to Gabriel Saldaña, Torsten Wagner, Steve Purcell for tips.

Like it? Buy Xah Emacs Tutorial.
blog comments powered by Disqus