[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ansi-color uses the same values for fore- and background colours
From: |
Eli Zaretskii |
Subject: |
Re: Ansi-color uses the same values for fore- and background colours |
Date: |
Wed, 09 Aug 2023 19:31:35 +0300 |
> From: Tony Zorman <tonyzorman@mailbox.org>
> Cc: emacs-devel@gnu.org, info@protesilaos.com
> Date: Wed, 09 Aug 2023 18:18:19 +0200
>
> On Wed, Aug 09 2023 16:28, Eli Zaretskii wrote:
> >> From: Tony Zorman <tonyzorman@mailbox.org>
> >> Date: Wed, 09 Aug 2023 14:10:44 +0200
> >>
> >> by default, all of the `ansi-color-«COLOUR»' faces (defined in
> >> `ansi-color.el') set the foreground and background colour to the exact
> >> same value.
> >
> > I believe this is intentional: that's how ANSI SGR sequences work on
> > terminals, right?
>
> I'm a bit rusty with my escape sequences; they don't hard-code colours,
> right? I thought that e.g. `ESC[31m' just means "colour the foreground
> on some kind of red", `ESC[41m' means the same for the background, and
> then the terminal interprets this appropriately. Is there actually some
> standard that says these two colours have to be the same
Well, they are both "red", so they are the same color. Anything else
will be very confusing, I think. Just think about it: you ask for
"red", but get something else, even if red-dish.