On 21 March 2018 at 12:47, Eli Zaretskii <eliz@gnu.org> wrote:
> From: Richard Copley <rcopley@gmail.com>
> Date: Wed, 21 Mar 2018 11:34:47 +0000
> Cc: John Wiegley <johnw@gnu.org>, Tom Tromey <tom@tromey.com>,
>       Emacs Development <emacs-devel@gnu.org>
>
> Is the current criterion (use white text on backgrounds inside a sphere of a given radius centred on black, in
> the color-distance metric space) a standard way of doing things?

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 is a luminance comparison against 60%, except that instead of computing luminance in any of the usual ways, it simply adds up the R, G and B components.

Also note that color-distance is based on a
metric that we didn't invent.  Not sure whether it makes that
"standard".

It's this particular way of using color-distance that we appear to have invented. If we didn't then we took it from somewhere else, and someone (Tom?) should know where.

And we didn't invent luminance!

> I'm not dismissing these arguments, I'm just saying that it's too late
to raise them for what will become Emacs 26.1.  We can make those
changes on master, if people agree with your reasoning, or we could
use the contrast criterion there, or something else.

Fair enough.
 
 But for the
release branch, the only change I can think of which will allow you to
get what you want in a safe way is the one I proposed: introduce a
customizable threshold.

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.

Thanks.