GNU bug report logs - #61188
30.0.50; color-lighten-name seems not to work

Previous Next

Package: emacs;

Reported by: "Mark Bestley" <gnu <at> bestley.co.uk>

Date: Mon, 30 Jan 2023 21:49:02 UTC

Severity: normal

Found in version 30.0.50

Full log


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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 61188 <at> debbugs.gnu.org, gnu <at> bestley.co.uk
Subject: Re: bug#61188: 30.0.50; color-lighten-name seems not to work
Date: Tue, 31 Jan 2023 21:34:24 +0100
On Tue, 31 Jan 2023 20:39:45 +0200 Eli Zaretskii <eliz <at> gnu.org> wrote:

>> Cc: 61188 <at> debbugs.gnu.org
>> From: Stephen Berman <stephen.berman <at> gmx.net>
>> Date: Mon, 30 Jan 2023 23:58:26 +0100
>>
>> On Mon, 30 Jan 2023 21:48:20 +0000 "Mark Bestley" <gnu <at> bestley.co.uk> wrote:
>>
>> > Look at the results of
>> >
>> > (require 'color)
>> > (message "reduce by 100 = %s" (color-lighten-name "Black" 100))
>> > (message "reduce by 0 = %s" (color-lighten-name "Black" 0))
>> >
>> > In emacs 28.2 they give "#ffffffffffff" and 0 as expected.
>> > In emacs 30.0.50 they give 0 and 0
>>
>> This difference is due to this commit:
>>
>> commit 656c2dd66e77a5fbeb99d358017e8327401fae05
>> Author:     Lars Ingebrigtsen <larsi <at> gnus.org>
>> Commit:     Lars Ingebrigtsen <larsi <at> gnus.org>
>> CommitDate: Tue Mar 22 15:28:02 2022 +0100
>>
>>     Fix color-lighten-hsl logic
>>
>>     * lisp/color.el (color-lighten-hsl): Lighten by percentage,
>>     instead of just adding the specified number to the luminance
>>     element (bug#54514).
>>
>> The patch below restores the Emacs 28 result for the above examples
>> while keeping the desired result for the example in bug#54514, but I
>> have no idea if it yields undesirable results in other cases.
>
> If all the tests in color-tests.el pass after the change, please
> install on the release branch.

With that patch one test now fails: the one testing (color-lighten-name
"Black" 100).  This is because the tests were changed to conform to the
code change made in response to bug#54514.  So it seems there is
disagreement about what the result of (color-lighten-name "Black" 100)
should be.

Steve Berman




This bug report was last modified 2 years and 120 days ago.

Previous Next


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