[Top][All Lists]

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

Re: master 68ae6fa: Improved light/dark colour predicate (bug#41544)

From: Mattias Engdegård
Subject: Re: master 68ae6fa: Improved light/dark colour predicate (bug#41544)
Date: Wed, 10 Jun 2020 21:34:31 +0200

10 juni 2020 kl. 21.20 skrev Stefan Monnier <monnier@iro.umontreal.ca>:

> Could we arrange to share the code with `color-srgb-to-xyz` (in `color.el`)?

We could, but I thought it useful to have the freedom to tweak the coefficients 
(and the gamma conversion) as required for this specific purpose, rather than 
being stuck with the theoretical CIE luminance from sRGB. This gives us more 
degrees of freedom than just having the cut-off value as modifiable parameter.

Experiments with some alternative coefficients and exponents showed fairly good 
results, but I went with the safer set of numbers for the initial version.

> Where does this 0.6 come from?

It's documented above, "a cut-off value determined experimentally". I can move 
the comment closer to the number.

reply via email to

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