From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: emacs-devel@gnu.org
Subject: Re: Dependent colours
Date: Fri, 15 Apr 2022 12:32:05 +0300 [thread overview]
Message-ID: <835yna3d62.fsf@gnu.org> (raw)
In-Reply-To: <8735ieivjo.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri, 15 Apr 2022 10:46:03 +0200)
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: emacs-devel@gnu.org
> Date: Fri, 15 Apr 2022 10:46:03 +0200
>
> 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.
I'm probably missing something: what other means do we have in Emacs
to produce colors on display, except via faces?
> :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.
If what you have in mind can play nicely with faces (and I think it
can, but I'm not yet sure I understand the issue, see above), then
yes, using face machinery is the best, as we have there a lot of
functionalities that can be used without effort.
next prev parent reply other threads:[~2022-04-15 9:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-14 13:00 Dependent colours Lars Ingebrigtsen
2022-04-14 13:36 ` 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 [this message]
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=835yna3d62.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.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.