emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Ansi-color uses the same values for fore- and background colours


From: Tony Zorman
Subject: Ansi-color uses the same values for fore- and background colours
Date: Wed, 09 Aug 2023 14:10:44 +0200

Hi,

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. 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:

---

[…] 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—or, depending on the
     monitor, completely—illegible.

     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%40hyperspace%3E

-- 
Tony Zorman | https://tony-zorman.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]