bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#41544: 26.3; Possible incorrect results from color-distance


From: Mattias Engdegård
Subject: bug#41544: 26.3; Possible incorrect results from color-distance
Date: Fri, 29 May 2020 19:28:44 +0200

29 maj 2020 kl. 17.36 skrev Eli Zaretskii <eliz@gnu.org>:

> Did you try what this does to tty-color-approximate and friends,
> especially when the terminal supports only 8 or 16 colors?  If not,
> please do, we must ensure there are no regressions there.

tty-color-approximate uses its own metric (square of the unweighted Euclidian 
RGB distance).
To test the TTY_SAME_COLOR_THRESHOLD, I tried 
display-supports-face-attributes-p, and it seems to behave in the same way. All 
tested with TERM=xterm-color, which gives the standard 8 colours.

The translated constants were obtained by generating many random RGB triples 
and computing distances between all pairs, then finding the value of NEWCONST 
which minimises the number of cases where

  old-colour-dist(c1,c2) < OLDCONST

and

  new-colour-dist(c1,c2) < NEWCONST

differ in truth value. The computation was also run on the rgb.txt list instead 
of random colours as an extra check.






reply via email to

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