emacs-devel
[Top][All Lists]
Advanced

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

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


From: Yuri Khan
Subject: Re: master 68ae6fa: Improved light/dark colour predicate (bug#41544)
Date: Sat, 13 Jun 2020 01:36:30 +0700

On Fri, 12 Jun 2020 at 22:50, Mattias Engdegård <mattiase@acm.org> wrote:

> Please load the attached code (any Emacs version), and run M-x 
> contrast-compare with various cutoff values on your favourite system, to find 
> what value is best for readability of the colour names (first column).
> Please reply (to emacs-devel or to me) the following pieces of information:
>
> * the cutoff value you found optimal
> * system information: window system, screen, anything you think is relevant
> * whether you use a light or dark background in your Emacs

Despite science calling for .18, I find that my subjective optimal
cutoff is somewhere between .25 and .31, even if I change the formulae
to more accurately model the piecewise gamma correction of sRGB:

-               (r (expt (nth 0 rgb) 2.2))
+               (R (nth 0 rgb))
+               (r (if (<= R 0.03928)
+                      (/ R 12.92)
+                    (expt (/ (+ R 0.055) 1.055) 2.4)))

(same for g and b.)

I am on GTK+3/X11, Dell P2415Q (HiDPI IPS), RGB-subpixel slight-hinted
Cousine font at 10.5pt, on overall dark gray background (#414042).



reply via email to

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