GNU bug report logs - #41544
26.3; Possible incorrect results from color-distance

Previous Next

Package: emacs;

Reported by: Simon Pugnet <simon <at> polaris64.net>

Date: Tue, 26 May 2020 16:34:01 UTC

Severity: normal

Tags: patch

Found in version 26.3

Full log


Message #46 received at 41544 <at> debbugs.gnu.org (full text, mbox):

From: Mattias EngdegÄrd <mattiase <at> acm.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tom <at> tromey.com, simon <at> polaris64.net, 41544 <at> debbugs.gnu.org
Subject: Re: bug#41544: 26.3; Possible incorrect results from color-distance
Date: Tue, 2 Jun 2020 17:27:46 +0200
1 juni 2020 kl. 19.44 skrev Eli Zaretskii <eliz <at> gnu.org>:

>> I'm just looking at the changes.  I see a change in how colors are
>> converted to RGB triplets.  I see a change in what colors are
>> considered dark and light, with a new function which decides that that
>> is being used for frame background mode and in several lisp/term/
>> files, including 16-color terminals.  I'm asking why do we want to
>> make all those changes, which modify very basic aspects of our color
>> support on many terminals.
> 
> And then, of course, there are the changes in color-distance itself,
> which change the values it returns.  Again, why such significant
> changes to fix an otherwise insignificant bug?

It is difficult to give precise answers to vague complaints. Take one thing at a time: as I wrote, there are two different patches addressing two almost completely different issues. Let's start with the color-distance changes, out of respect for the bug reporter if nothing else.

It is not possible to change a function without changing it. Either we fix it or we don't. The reported bug was about broken symmetry, which is rather embarrassing; as written previously, the first analysis uncovered deeper issues worth fixing, such as loss of precision and (especially) the nonlinearity that causes triangle inequality violation.

The proposed fixes to color-distance, I hope you agree, are straightforward, reasonable and address all these points. Callers have been updated with carefully recomputed comparison constants; I detailed how they were obtained in a previous reply, and test have all been satisfactory.





This bug report was last modified 4 years and 304 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.