From: Lars Ingebrigtsen <larsi@gnus.org>
To: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Dependent colours
Date: Thu, 14 Apr 2022 15:00:55 +0200 [thread overview]
Message-ID: <8735ifom48.fsf@gnus.org> (raw)
In many situations, packages and users need to specify colours to use
for something. We generally defer this to the face machinery, because
which colours to use for something might depend on whether you have a
light or dark background, or whether it's a GUI Emacs or a terminal one,
etc.
This works well as a machinery, but it's pretty cumbersome when the user
just wants to specify a list of colours.
So I'm wondering whether we could create something that would make
things easier for the user here, and if anybody had any thoughts on the
issue.
Off the top of my head... if we had something like
(make-color "red")
(make-color ((background light) "blue")
((background dark) "red"))
Uhm... Or something... better... :-)
Anyway, code that uses these colour objects would then create real
(dynamic) faces out of them, eventually, so that there'd be no change in
the display engine (I think).
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next reply other threads:[~2022-04-14 13:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-14 13:00 Lars Ingebrigtsen [this message]
2022-04-14 13:36 ` Dependent colours Lars Ingebrigtsen
2022-04-14 14:11 ` Stefan Monnier
2022-04-14 14:14 ` Lars Ingebrigtsen
2022-04-14 14:57 ` [External] : " Drew Adams
2022-04-14 15:26 ` Lars Ingebrigtsen
2022-04-14 13:48 ` Eli Zaretskii
2022-04-14 13:56 ` Lars Ingebrigtsen
2022-04-14 16:10 ` Eli Zaretskii
2022-04-14 16:13 ` Lars Ingebrigtsen
2022-04-14 16:23 ` Eli Zaretskii
2022-04-15 8:46 ` Lars Ingebrigtsen
2022-04-15 9:32 ` Eli Zaretskii
2022-04-15 9:48 ` Lars Ingebrigtsen
2022-04-15 10:32 ` Po Lu
2022-04-15 10:37 ` Lars Ingebrigtsen
2022-04-15 11:12 ` Po Lu
2022-04-15 10:38 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8735ifom48.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=emacs-devel@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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.