jcubic
jcubic

Reputation: 66480

How to create new fontface color in Emacs?

Is it possible to have new name with hex color for use with set-face-attribute?

I look at list-colors-display but the list is limited. Can I create new color? Something like:

(???? "simplegreen" "#096500")

(set-face-attribute 'term-color-green nil :foreground "simplegreen")

Upvotes: 1

Views: 302

Answers (1)

Drew
Drew

Reputation: 30701

Command list-colors-display lists only the named colors that Emacs recognizes for your system. These are not the only colors available.

You can use any RGB hex value. Your system might limit the number of hex digits, e.g., only up to 3 digits for each of R, G, and B. Just precede the digits with #. For example: #03A9C2E55.

Upvotes: 1

Related Questions