From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tony Zorman Newsgroups: gmane.emacs.devel Subject: Re: Ansi-color uses the same values for fore- and background colours Date: Wed, 09 Aug 2023 18:18:19 +0200 Message-ID: <878rakmbp0.fsf@hyperspace> References: <87h6p8mn5n.fsf@hyperspace> <83msz0l4zb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19839"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, info@protesilaos.com To: Eli Zaretskii 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-0004uU-6E 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 1qTm5w-0002ON-1L; Wed, 09 Aug 2023 12:31:36 -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 1qTltF-00005t-Vc for emacs-devel@gnu.org; Wed, 09 Aug 2023 12:18:30 -0400 Original-Received: from mout-p-201.mailbox.org ([2001:67c:2050:0:465::201]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1qTltD-0003cS-P1; Wed, 09 Aug 2023 12:18:29 -0400 Original-Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4RLZwt2wQLz9trk; Wed, 9 Aug 2023 18:18:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1691597902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zSJA0icaNze22TEcheXMGPr6BgJ8xmhZAbPtHwoNk/Q=; b=KqmS09RbsnsFdESnGVr7oxdo8oNXJ7YJftmAba0oFOLRsA1LlJU3fUFZJ8lqbyiRqsYAxg pnpbKz3ZiK3f/M908LaUP9WZpz+ov8Z/Nuf30Tm5h7giFg+C25iOQHS3PRu0poasWsOHXI w8ffCsS9aMMe/UySaU/3UlpvMb9UBNEhswQBdRfcAX0QTJAFKp4yZtruU9nnTMr3lk3pfg LP/lKRMasuhRsXhbfL1hfmIwnIeSVcOQ57ZSc+7NHxAPqTn1vjpSvqqKK/x5LbdWjL83uL VnMWWaCq5iFfd2fIjslWaTYJrlV0s8sP37LUo49WW40ylo4lTq+GikxdfmT/oA== In-Reply-To: <83msz0l4zb.fsf@gnu.org> X-MBO-RS-META: mdsrchfh141nqoez1oci4q7zf7g356tb X-MBO-RS-ID: 9620d4f1fd51f54ffc0 Received-SPF: pass client-ip=2001:67c:2050:0:465::201; envelope-from=tonyzorman@mailbox.org; helo=mout-p-201.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 09 Aug 2023 12:31:25 -0400 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:308486 Archived-At: On Wed, Aug 09 2023 16:28, Eli Zaretskii wrote: >> From: Tony Zorman >> Date: Wed, 09 Aug 2023 14:10:44 +0200 >>=20 >> by default, all of the `ansi-color-=C2=ABCOLOUR=C2=BB' 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, or am I missing some other detail? I suppose terminals implementing this could choose to use the same value for both colours, and maybe most of them did. Either way, I guess the modus-themes shouldn't run into any issues when diverging from this. Thanks! --=20 Tony Zorman | https://tony-zorman.com/