From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Ansi-color uses the same values for fore- and background colours Date: Wed, 09 Aug 2023 19:31:35 +0300 Message-ID: <837cq4kwig.fsf@gnu.org> References: <87h6p8mn5n.fsf@hyperspace> <83msz0l4zb.fsf@gnu.org> <878rakmbp0.fsf@hyperspace> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19670"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, info@protesilaos.com To: Tony Zorman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 09 18:32:15 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qTm6Y-0004uC-7K for ged-emacs-devel@m.gmane-mx.org; Wed, 09 Aug 2023 18:32:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTm5s-0002Hp-Qa; Wed, 09 Aug 2023 12:31:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTm5Z-0002FJ-E9 for emacs-devel@gnu.org; Wed, 09 Aug 2023 12:31:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTm5X-0006WO-Ps; Wed, 09 Aug 2023 12:31:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=BRQ+tCsGtVJwv5NBfq8kq2YilqFGLubfAOV6xKpsmpA=; b=eVsahBtyfVkQ2GB3bPIw yW1mI0T3xubooXdh7DMn1hqgg2ZcxBAn3I6NqylwfHZ06l8tD2WQtT1RRV4cmcJhXK7ZZy2ZybpXo Nd7aHUmOyLGG8M32qN2cLMH71MK98hPq4gpDYDiw9JcKDzZHtiAYWFuGsnbM8/VGlti8we4AINSo+ zEx3whqnJqZ0pCwmx5WOHoqnCEPEmLp1hQKvRYSm4fkmzKL9Qo3vkyFN7NAfZliHYUbNxcPVDxv/X ocQWIbWJKyPEN0TDzpFZ3AcEImfklUnODHHX8auUlQ4AKbcL6RfoWlixBtveNTrG0COVaKQoipuCM 7dyi1G29l0ySoQ==; In-Reply-To: <878rakmbp0.fsf@hyperspace> (message from Tony Zorman on Wed, 09 Aug 2023 18:18:19 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:308485 Archived-At: > From: Tony Zorman > 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 > >> 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.