On 21 March 2018 at 13:32, Eli Zaretskii wrote: > > From: Richard Copley > > Date: Wed, 21 Mar 2018 13:22:37 +0000 > > Cc: John Wiegley , Tom Tromey , > > Emacs Development > > > > We do something very similar in frame-set-background-mode and in > > tty-color-approximate. > > > > I don't see it. You're talking about this? > > > > ((>= (apply '+ (color-values bg-color frame)) > > ;; Just looking at the screen, colors whose > > ;; values add up to .6 of the white total > > ;; still look dark to me. > > (* (apply '+ (color-values "white" frame)) .6)) > > That's the first example, yes. > > > It's this particular way of using color-distance that we appear to > > have invented. > > Not according to the article from which the implementation of > color-distance was taken. ??? > If we didn't then we took it from > > somewhere else, and someone (Tom?) should know where. > > The comments in the sources of color-distance tell where we took it > from. > The comments, and the article, say where the colour distance formula itself comes from. The article doesn't support our usage of the formula at all. It says: >> This distance will only be used in comparisons, to verify whether one colour, *A*, is closer to colour *B* or to colour *C*. That's what my patch 1 does. It's nothing like what the current code does. > I don't believe the concept of a sphere centred on black is a useful one > in this context, or that allowing the > > user to vary its radius makes it any better. > > I suggest to read the original article mentioned above. > I suggest you re-read it.