rainbow-mode is a minor mode for Emacs which displays strings representing colors with the color they represent as background.

rainbow-mode

Where to download

It is available from GNU ELPA.

You can install it from M-x list-packages in Emacs 24.

How to use

Type M-x rainbow-mode. Rbow should be added to the mode-line, indicating that Rainbow mode is in effect. You can deactivate it with the same command.

When activated, all strings representing colors will be highlighted with the color they represent.

Some colors, like HTML colors name (yellow, red, …) and rgb() ones are automatically activated in some mode like html-mode or css-mode. On the other hand, the X colors are activated only in some mode like emacs-lisp-mode or c-mode. The hexadecimal ones (#aabbcc) are always activated.

All this can be configured via M-x customize-group rainbow.



Date: 2012-01-19 22:50:52 and last modified: 2012-01-19 22:51:27

Relate tags:

Hot tags: