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: Ansi-color uses the same values for fore- and background colours Date: Wed, 09 Aug 2023 14:10:44 +0200 Message-ID: <87h6p8mn5n.fsf@hyperspace> 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="7515"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org, Protesilaos Stavrou Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 09 14:50:50 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 1qTieI-0001m6-R8 for ged-emacs-devel@m.gmane-mx.org; Wed, 09 Aug 2023 14:50:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTie3-0003WP-TZ; Wed, 09 Aug 2023 08:50:35 -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 1qTi1f-0003dw-39 for emacs-devel@gnu.org; Wed, 09 Aug 2023 08:10:55 -0400 Original-Received: from mout-p-102.mailbox.org ([80.241.56.152]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1qTi1c-0004dz-OV for emacs-devel@gnu.org; Wed, 09 Aug 2023 08:10:54 -0400 Original-Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (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-102.mailbox.org (Postfix) with ESMTPS id 4RLTRB1ztdz9v9Y; Wed, 9 Aug 2023 14:10:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1691583046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IwGi8dxb4Zicj0KR69aWKqBxdKpPnyhU5R2hbLwEISc=; b=tD3R7ybA6A7AKHswZloYKEgt/w3HfvThNYBgMoUESf5ixQukIRCajlriTI7mpH9xeOdaTs DNfjrpLw9/bVgnzrFYOiySwAGF4rnfV7z+D4go9LpHVL1hDF1+NS8m8EaY9n4aMmOS14k/ DYh+nc7g6t1NI4K+ONxCTKu0WNT3fkWJxWLYIebx/DD2iTXxB3mqiepTgbdFUOn+SRfasD QrCliHzuyKdj9k0cgpP3rX69po+tiznFKkk8g2rs40nmirmiJZlraL6yx0gah170VC66dI 7FD/vT80uStSEPA3FeNO98HrwUPx+066oE+pmxf09ZGVdCfM0WHHtpT2Fvj8gA== X-MBO-RS-ID: 305efa3b5485f46233d X-MBO-RS-META: djf7pa5z8eyuwzpk71ecmeo3y1unobw5 Received-SPF: pass client-ip=80.241.56.152; envelope-from=tonyzorman@mailbox.org; helo=mout-p-102.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, RCVD_IN_MSPIKE_H2=-0.001, 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 08:50:33 -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:308473 Archived-At: Hi, 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. Depending on the colour scheme, this can lead to text that's quite hard to read. The question is whether this is intentional, because some component or other relies on it, or it's just that no one bothered to think of good matches here. This was originally a bug report for the modus-themes.[1] Here is the relevant part of the email: --- [=E2=80=A6] this can result in hard to read text; for example: https://i.imgur.com/nZsh00N.png Notice the blue background in the bottom left corner. Here's a reproducer: 1. Basic environment: $ emacs -Q --eval "(load-theme 'modus-operandi)" 2. Start `term': M-x term RET In a second prompt, `term' asks you to choose a shell. To make sure no user options are at play here, I opted for `/bin/sh' (this is dash for me). 3. Do something that involves a pager: git add --help 4. Notice that the temp file name in the bottom left has a very dark blue background, making the text almost=E2=80=94or, depending on the monitor, completely=E2=80=94illegible. Upon pressing any key, the title will vanish. However, one can also search for something, which uses the same face: / This RET --- Note that I'm not necessarily advocating for changing the defaults, although that would be the most desirable outcome. This is just to make sure that the modus-themes using different fore- and background colours doesn't violate any implicit assumptions. Tony [1]: https://lists.sr.ht/~protesilaos/modus-themes/%3C87fs4wforf.fsf%40hype= rspace%3E --=20 Tony Zorman | https://tony-zorman.com/