From: Ergus <spacibba@aol.com>
To: Ergus via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: Use variable in setcustom
Date: Sun, 10 Nov 2019 03:30:36 +0100 [thread overview]
Message-ID: <20191110023036.r2gsq6znmykbol7q@Ergus> (raw)
In-Reply-To: 20191110023036.r2gsq6znmykbol7q.ref@Ergus
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
my/colors)))
```
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,
Ergus
next parent reply other threads:[~2019-11-10 2:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20191110023036.r2gsq6znmykbol7q.ref@Ergus>
2019-11-10 2:30 ` Ergus [this message]
2019-11-14 9:24 ` Use variable in setcustom Eli Zaretskii
2019-11-14 10:09 ` Yuri Khan
2019-11-15 1:19 ` [OFFTOPIC] " VanL
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191110023036.r2gsq6znmykbol7q@Ergus \
--to=spacibba@aol.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).