[Top][All Lists]

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

Re: CSS contrast (#30295) (was Re: Heads-up: Emacs 26.1 RC1)

From: Richard Copley
Subject: Re: CSS contrast (#30295) (was Re: Heads-up: Emacs 26.1 RC1)
Date: Wed, 21 Mar 2018 14:24:50 +0000

On 21 March 2018 at 13:32, Eli Zaretskii <address@hidden> wrote:
> From: Richard Copley <address@hidden>
> Date: Wed, 21 Mar 2018 13:22:37 +0000
> Cc: John Wiegley <address@hidden>, Tom Tromey <address@hidden>,
>       Emacs Development <address@hidden>
>  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

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.

reply via email to

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