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


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Mark Bestley" <gnu <at> bestley.co.uk>
Cc: stephen.berman <at> gmx.net, 61188 <at> debbugs.gnu.org
Subject: bug#61188: 30.0.50; color-lighten-name seems not to work
Date: Wed, 01 Feb 2023 19:18:50 +0200
> Date: Wed, 01 Feb 2023 14:11:13 +0000
> From: "Mark Bestley" <gnu <at> bestley.co.uk>
> Cc: 61188 <at> debbugs.gnu.org
> 
> > So I guess the current behavior is the intended one, and we should
> > close this bug as wontfix?
> 
> No - I think the way 28.2 worked was correct. (for impact see highlight-indent.el which now does not work with a black background )

But by changing the tests to match what Emacs does now we explicitly
said that we disagree, and that the current behavior is the correct
one.

> What is the expected value of (color-lighten-name  "Black" 100) as I don't know where that test is. I would think the test is wrong. Did it run for 28.2?

The test is in test/lisp/color-tests.el.  The expected value is
exactly what you said is wrong.

> Surely lightening Black fully should give white

How so?  The 100 is the percentage of the present luminance, and if
that is zero, why do you expect it to become lighter?

See also the discussion in bug#54514, which was exactly about that.

> In 30 olor-lighten-name  "Black" of any positive value gives Black - surely this cannot be correct.

A zero multiplied by any percentage stays zero, no?  If you want a
non-zero result, start with something close to black, but not actually
black.




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.