GNU Emacs Manual - Format Colors

Go to the first, previous, next, last section, table of contents.

### Colors in Formatted Text

You can specify foreground and background colors for portions of the text. There is a menu for specifying the foreground color and a menu for specifying the background color. Each color menu lists all the colors that you have used in Enriched mode in the current Emacs session.

If you specify a color with a prefix argument--or, in Transient Mark mode, if the region is not active--then it applies to your next self-inserting input. See section Transient Mark Mode. Otherwise, the command applies to the region.

Each color menu contains one additional item: ``Other'`. You can use this item to specify a color that is not listed in the menu; it reads the color name with the minibuffer. To display list of available colors and their names, use the ``Display Colors'` menu item in the Text Properties menu (see section Editing Format Information).

Any color that you specify in this way, or that is mentioned in a formatted text file that you read in, is added to both color menus for the duration of the Emacs session.

There are no key bindings for specifying colors, but you can do so with the extended commands `M-x facemenu-set-foreground` and `M-x facemenu-set-background`. Both of these commands read the name of the color with the minibuffer.

Go to the first, previous, next, last section, table of contents.