all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Copley <rcopley@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: John Wiegley <johnw@gnu.org>, Tom Tromey <tom@tromey.com>,
	Emacs Development <emacs-devel@gnu.org>
Subject: Re: CSS contrast (#30295) (was Re: Heads-up: Emacs 26.1 RC1)
Date: Wed, 21 Mar 2018 13:22:37 +0000	[thread overview]
Message-ID: <CAPM58ojZwck4bojnW4nBBxJJFrPfJS+jN6KC9hWavQajZfY9MQ@mail.gmail.com> (raw)
In-Reply-To: <83y3ilk32z.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1998 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 3444 bytes --]

  reply	other threads:[~2018-03-21 13:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-20 19:02 CSS contrast (#30295) (was Re: Heads-up: Emacs 26.1 RC1) Richard Copley
2018-03-20 19:17 ` Eli Zaretskii
2018-03-20 19:56   ` Richard Copley
2018-03-21  5:52     ` Yuri Khan
2018-03-21  7:54       ` Eli Zaretskii
2018-03-21  7:38     ` Eli Zaretskii
2018-03-21  9:59       ` Richard Copley
2018-03-21 11:34         ` Richard Copley
2018-03-21 12:47           ` Eli Zaretskii
2018-03-21 13:22             ` Richard Copley [this message]
2018-03-21 13:32               ` Eli Zaretskii
2018-03-21 14:24                 ` Richard Copley
2018-03-21 15:36                   ` Eli Zaretskii
2018-03-21 19:03                     ` Richard Copley
2018-03-21 12:40         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPM58ojZwck4bojnW4nBBxJJFrPfJS+jN6KC9hWavQajZfY9MQ@mail.gmail.com \
    --to=rcopley@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=johnw@gnu.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.