GNU bug report logs -
#50179
[PATCH] Add support for "bright" ANSI colors to ansi-color and term-mode
Previous Next
Reported by: Jim Porter <jporterbugs <at> gmail.com>
Date: Tue, 24 Aug 2021 04:04:02 UTC
Severity: wishlist
Tags: patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 50179 <at> debbugs.gnu.org (full text, mbox):
On Tue, Aug 24, 2021 at 10:59 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > From: Jim Porter <jporterbugs <at> gmail.com>
> > Date: Tue, 24 Aug 2021 10:38:06 -0700
> > Cc: 50179 <at> debbugs.gnu.org
> >
> > > I wouldn't offer a customizable list for this: users have no
> > > particular reason to redefine standard colors.
> >
> > I made this a defcustom because `ansi-color-faces-vector' and
> > `ansi-color-names-vector' are defcustoms too. More practically
> > speaking, I'd want to customize this new variable to make these colors
> > match the Emacs theme I use. I chose colors in this patch to
> > complement `ansi-color-names-vector', but they'd clash with my theme.
>
> How can named colors change with the theme? Faces can, but colors are
> absolute. Bright-yellow is the same color whatever the theme. At
> least IMO. I wonder if others think otherwise.
The colors in `ansi-bright-color-names-vector' are just the color
values that get used to set face attributes on bits of text. They (and
the values in the other defcustoms mentioned above) get compiled into
`ansi-color-map', which contains entries like `(foreground-color .
"yellow2")'. Those then get applied as face attributes onto the
relevant text. While you'd always want bright-yellow to be some kind
of bright-looking yellow, the exact RGB value for that is just a
matter of preference. In particular, a theme might need to adjust
these color values so that there's appropriate contrast between
ANSI-colorized text and the default foreground/background color
specified by the theme.
> > Would it be ok to use `ansi-color-bold-is-bright'
> > (from patch 1 in `ansi-color.el') in `term.el'?
>
> Yes, why not?
Mostly just my relative unfamiliarity with the preferred way to do
things here. `ansi-color.el' and `term.el' seemed very independent of
each other, and I wasn't sure if there was a particular reason for
that. I'll just use `ansi-color-bold-is-bright' for both patches then.
This bug report was last modified 3 years and 242 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.