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: Fri, 12 Jun 2020 02:22:58 +0700

On Thu, 11 Jun 2020 at 23:15, Mattias Engdegård <mattiase@acm.org> wrote:
> For example, white text is decidedly more readable than black onto a 
> background of #8b7500 (gold4) everywhere. Of course, your equipment may be 
> different!

My equipment (which is two myopic and slightly astigmatic eyes looking
through corrective glasses at a 24″ IPS-based Dell P2415Q running at
native resolution and with contrast and brightness knobs tuned to not
be painful but still pass the tests at
<http://www.lagom.nl/lcd-test/>) says that shade of gold in fact
performs okay in all four scenarios: gold on black, gold on white,
white on gold, black on gold.

> Precision may be more important when the same predicate is used for selecting 
> prearranged palettes for use against 'light' and 'dark' backgrounds. This 
> still needs to be investigated.

WCAG recommends a color contrast of at least 4.5 for most uses of text
below 18pt (or 14pt bold). The range of color contrast (1 to 21) and
the inherent properties of real numbers (4.5^2 = 20.25) suggest that
there is only a fairly narrow band of colors that satisfies that
contrast level against both white and black.

Further, if you were to pick a palette consisting of white, black, and
multiple colors from that band, you’d get another problem. Namely, all
your text is the same relative luminance. That means you have to
distinguish e.g. syntax elements solely by their hue. Users with color
vision anomalies might not even be able to do that.

A good palette meets or exceeds the recommended contrast ratio against
the background for all text colors, and provides at least *some*
variation in relative luminance of text colors.



reply via email to

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