emacs-devel
[Top][All Lists]
Advanced

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

Dependent colours


From: Lars Ingebrigtsen
Subject: Dependent colours
Date: Thu, 14 Apr 2022 15:00:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

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




reply via email to

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