9 juni 2020 kl. 18.20 skrev Eli Zaretskii : >> Let's consider the three saturated colours #ff0000 (red), #00ff00 (green) and #0000ff (blue). Black text looks terrible on blue, as does white on green; black on red isn't good either. This comes as no surprise: the human eye is more sensitive to brightness levels of green than blue, with red somewhere in-between. > > Here we already not necessarily agree: at least on some text-mode > terminals some of the above combinations look quite legible to me. Of course there will be some terminals where some of the combinations are legible. But that wasn't the point, the point being that they are less legible that the alternative, and on most terminals substantially so. > Like I said: individual taste and differences, as well as different > RGB values used by some terminals for the same color names, can and do > wreak havoc on this, so a perfect solution is simply not possible. Nowhere did I claim perfection; let's tuck away the straw men. However, I do think we should strive to do as well as we can, and I think I'm not alone. This is not a matter of individual taste: colour perception is a science. It is true that Emacs sometimes doesn't know the exact colours used by the terminal, but that is a problem that the old code suffers from as well. Maybe the old predicates are more robust for bad input? Unfortunately, there is no evidence of this at all; I've experimented with many terminals and settings. See further below for a counter-example. > Again, I see no practical problems described here, just a theoretical > issue with the particular implementations we have now. Those > implementations do their job, although they are clearly not perfect. > However, I seed no reason to seek perfection in this case. Again, it is not a matter of perfection but about being better. Or more critically, avoiding being bad. The new predicate almost never gives bad results; the old ones often do. If you want to argue for the old code, please come up with precise examples of colours for which they avoid a bad decision while colour-dark-p does not. You could also show how the old predicates are better than the new one in a majority of cases. Describe the circumstances (environment, configuration etc) so that they can be reproduced. Meanwhile, here are two screenshots of Emacs displaying some lisp code, both using XTerm version 328, configured for 256 colours, with TERM=xterm-256color, and the same background, without any Emacs customisation. First, without the patch: