GNU bug report logs -
#74055
31.0.50; color-lighten-name not lightening black
Previous Next
Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Date: Mon, 28 Oct 2024 08:29:02 UTC
Severity: normal
Found in version 31.0.50
Fixed in version 31.1
Done: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #23 received at 74055 <at> debbugs.gnu.org (full text, mbox):
Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> From: Mattias Engdegård <mattias.engdegard <at> gmail.com>
>>> Date: Mon, 28 Oct 2024 17:57:49 +0100
>>> Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
>>> Julien Danjou <julien <at> danjou.info>,
>>> 74055 <at> debbugs.gnu.org,
>>> Noah Friedman <noah <at> splode.com>
>>>
>>> 28 okt. 2024 kl. 13.39 skrev Eli Zaretskii <eliz <at> gnu.org>:
>>>
>>> > Our notion of "lighten color" seems to be to increase the color's
>>> > luminance by P percent. Since the black color's luminance is zero,
>>> > increasing that by 50% still yields zero.
>>> >
>>> > By contrast, the page you point to seems to interpret "lighten" to
>>> > mean that P is the percentage of the full scale, not of the original
>>> > color's luminance.
>>> >
>>> > This goes back to commit 656c2dd66e, which was supposed to fix
>>> > bug#54514. But maybe Noah's interpretation of "lighten" was
>>> > incorrect, and we should revert that change? OTOH, if we do revert
>>> > it, then Noah's example will disagree with the above page.
>>>
>>> That change may have been made in haste. For example, it didn't
>>> touch the corresponding saturate and desaturate functions which use
>>> similar mechanics, so there is now an inconsistency in that respect.
>>>
>>> But which interpretation is better isn't obvious. It doesn't have
>>> much to do with colour theory per se. As luminance is already a
>>> percentage of sorts, it's not at all clear what it means by
>>> increasing it by a certain percentage. Personally I wouldn't use
>>> either function because of how ill-defined they are.
>>
>> Maybe there are widely-accepted de-facto standards for that?
>
> I think HSL colors (Hue Saturation Luminescence) are used by CSS for
> example, so that's good, and color.el has support for HSL colors. Except
> that something is currently not working right, I guess.
TIL the L in HSL actually stands for lightness. And the math for RGB <->
HSL conversion is nicely explained here:
https://www.niwa.nu/2013/05/math-behind-colorspace-conversions-rgb-hsl/
This bug report was last modified 277 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.