Adjusting shell mode color schemes Adjusting shell mode color schemes shell shell

Adjusting shell mode color schemes


When a program run inside shell-mode issues ANSI escape characters to set the display color to, say, magenta, Emacs intercepts those escape characters and creates a colored overlay using that exact foreground color "magenta". So there's no color theme interaction going on here, and no shell-specific customizations to look for.

The interception is made by the functions in ansi-color.el, though, and it looks like you could customize ansi-color-names-vector, so to use "PaleBlue" for "blue", either M-x customize RET ansi-color-names-vector, or try putting something like the following in your emacs config:

(setq ansi-color-names-vector  ["black" "red" "green" "yellow" "PaleBlue" "magenta" "cyan" "white"])

To see available color names, use M-x list-colors-display, or enter hex colors instead, e.g. "#ccccff".


Some color-themes are designed to look good in the terminal. If none of them suit, you could use one a starting point for your own theme. I select the appropriate theme for X/terminal like this:

(if (eq (window-system) 'x)    (color-theme-gray30)    (color-theme-emacs-nw))