From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.devel Subject: Re: Ansi-color uses the same values for fore- and background colours Date: Wed, 9 Aug 2023 09:46:27 -0700 Message-ID: <73b5085d-127d-6760-c32d-56ecd3b8a6e0@gmail.com> References: <87h6p8mn5n.fsf@hyperspace> <83msz0l4zb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18749"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, info@protesilaos.com To: Eli Zaretskii , Tony Zorman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 09 18:47:19 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 1qTmL9-0004gp-CJ for ged-emacs-devel@m.gmane-mx.org; Wed, 09 Aug 2023 18:47:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTmKU-0001Ax-O3; Wed, 09 Aug 2023 12:46:39 -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 1qTmKP-00017R-Vb for emacs-devel@gnu.org; Wed, 09 Aug 2023 12:46:37 -0400 Original-Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qTmKO-0001dJ-0r; Wed, 09 Aug 2023 12:46:33 -0400 Original-Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-686ea67195dso5142064b3a.2; Wed, 09 Aug 2023 09:46:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691599590; x=1692204390; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=rIn4rILu1DkB9BJHspaFKvFD3EhpkaB+xKcJmP5CmfM=; b=RU9lSFRE/n0P/qVngWFXZcHTQKSeOfhP2B4067OAT+Eed3IbRfFKUtGqwst9zgFRUY G7EeIdpbjbGGN+X5anuydAv6iyValO/xlNcftY0+tWNW2z46K1GebWyWLhSeUJsCWVnn AAJ+QEVg5OAYyDe/TGx3GMNnMHYieOpU0OwsfLux2xLRRMdHcsXZK4wKankgi97JanVk ivfqLZYwRGU+ctFutwG+SyQJCxUC848Orvu/YSrYmYQo514iMJruNaElzdxo+3n0GWal MdB6LtJrH836vzv5sKRwKywzgcqPYxkic1rACH3R5x/esBRjfISZJS6b1TwPFlp6J3HX hH9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691599590; x=1692204390; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rIn4rILu1DkB9BJHspaFKvFD3EhpkaB+xKcJmP5CmfM=; b=VDl0mMLaHPtn3t+0qmoz+t4NFUgtrQdCNIS7fpW6nfPG+9L/iLhHiUKQ3yRablm0bY IXlMpBOJ36QPPX4PRu/AnRGWqT1IovkQ94EuJM0bpHtWN0IPJuriyf8kVG/rSioEiTE2 vIEC4WjxcV9a4YdlmpqJJkXLBIKFGBphRhxufzt+pA5ehBay9fUpawIH8TQ92v7nMcbn N0i0pww9bYhK0bptz3JCUvBfrbjbjMJbkoF/cZxC0Ig+dKf1sF+juWsqEG9uRJ6J6ldl HjNrynpBnGYjGDwFxarHdR6gMv/ifr1Ug7nPsKHi1jrbpgRa7OVvDXU3PtuOQuvQyifS /mHg== X-Gm-Message-State: AOJu0Yz8nHZqqdFN7SNfWppLx6125qUdDLLeuB9zN1iCJdndTpJfirUJ 9qeecQi32wswPyZp4eoigF/f89ZOn7I= X-Google-Smtp-Source: AGHT+IHgSu1BhV6l+ELBnkSO00AcgkOd0gEu1C1a8NXeb6vpUxl1HRjOiEAfhjiuElpZVCwGhsrXPw== X-Received: by 2002:a05:6a00:1409:b0:673:8dfb:af32 with SMTP id l9-20020a056a00140900b006738dfbaf32mr3246284pfu.26.1691599589614; Wed, 09 Aug 2023 09:46:29 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id i2-20020aa787c2000000b0067b643b814csm10232917pfo.6.2023.08.09.09.46.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Aug 2023 09:46:28 -0700 (PDT) Content-Language: en-US In-Reply-To: <83msz0l4zb.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=jporterbugs@gmail.com; helo=mail-pf1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:308488 Archived-At: On 8/9/2023 6:28 AM, 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? Yes. Emacs *could* color the foreground and background differently, but I don't believe it should (users are free to customize things however they like, of course). Every terminal emulator I'm aware of uses the same palette for foreground and background colors, so I think we should follow suit. Instead, the goal should be to ensure a reasonable level of contrast between commonly-used color pairs of different foregrounds/backgrounds. At minimum, SGR white or black on any of the other basic colors should be readable. I don't think there's a bug here.