emacs-devel
[Top][All Lists]
Advanced

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

Re: Dependent colours


From: Lars Ingebrigtsen
Subject: Re: Dependent colours
Date: Fri, 15 Apr 2022 10:46:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> Anyway, colors in Emacs are face attributes.

Colours are colours, but we usually use the face machinery to specify
them, and we (almost always) instantiate them on the screen via the face
machinery.  That doesn't mean that colours per se are face attributes.

The reason I started thinking about these things, once again, is because
vtable allows you to specify (alternating) row and column background
colours, and where they intersect, vtable computes the blend of colours.
The obvious way people to use this is to say

:column-colors '("red" "blue")
:row-colors '("green" "yellow")

and that's it.  But pondering this a bit more, perhaps using faces here
would be nicer anyway -- the package writer may be wanting to use
alternating foreground colours on the rows anyway.  So

:column-colors '((:background "red") (:background "blue"))
:row-colors '((:foreground "green") (:foreground "yellow"))

is more expressive.  (And vtable will just have to check both foreground
and background colours on the faces and blend accordingly, but that's
just a small matter of programming.)

And besides, using faces for things like this has the advantage of
fitting into the theming architecture.  I mean, if it's

:column-colors '(list-timer-column-even list-timer-column-odd)

and those are faces, we don't have to extend the theming machinery to
handle theming of colours.

-- 
(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]