Pop-up color from a color bar, such as `# f2d3aa` with Emacs

I am using scss-mode in Emacs.

There are many color lines in the text, for example #f2d3aa .

I wonder if there is a function that sets the square of color from the line of the current position.

Is there such an emacs feature?

+8
colors emacs
source share
2 answers

I am using rainbow-mode . This is a minor mode that fonts text color descriptions as you type.

Very convenient as it received only one interactive function (i.e. rainbow-mode ). It is available from MELPA.

rainbow-mode example

+12
source share

Here are some tools that can help:

  • hexcolour.el - shows such hexadecimal color codes in their own color in the text

  • palette.el - interactive color palette: accepts such hexadecimal codes as input and provides them as output (in addition to color names, etc.)

  • hexrgb.el - (used by the color palette and other libraries) color processing functions

The first, hexcolour.el , is closest to what you requested.

+1
source share

All Articles