[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Use variable in setcustom

From: Ergus
Subject: Use variable in setcustom
Date: Sun, 10 Nov 2019 03:30:36 +0100

Hi I want to have a simple colour palette that must be compatible with
tui and gui.

The problem is that the color names are not the same so for example the
brightblack are not available in gui only in tui.

To work around this I made:

(defconst my/colors '((black . "#000000")
                      (red . "#cd0000")
                      (brightcyan . "#00ffff")
                      (brightwhite . "#ffffff"))
  "List of colors.")

And then I assign the colors with something like:

(set-face-foreground 'font-lock-preprocessor-face (cdr (assq 'magenta

But if I try to use a better method for my colors as Stefan suggested:

(custom-set-face ...)

It doesn't work. Do we have some method to define colours or paletes?

So that I could use a similar approach like?

(set-face-foreground 'font-lock-preprocessor-face "mycolor")

Thanks in advance,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]