auctex-devel
[Top][All Lists]
Advanced

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

Re: Some font faces have poor contrast


From: Miguel V. S. Frasson
Subject: Re: Some font faces have poor contrast
Date: Thu, 8 Aug 2024 21:12:43 -0300

Dear Christopher.

In order to propose a useful fix, I did do metrics to get a better contrast.

I made a code to compute the luminance L of all colors in AUCTeX.

The luminance of a color named COLOR-NAME can be computed natively as
(nth 2 (apply 'color-rgb-to-hsl
                   (color-name-to-rgb COLOR-NAME)))

The worst case scenario is when theme authors choose background color in mid tones (background luminance around 0.5).

To detect poor contrast, in light background, foreground color should have luminance < 0.4, and in dark background, luminance > 0.6. So the metric was at least 0.1 for the worst scenario, but a wise choice for themes is not such a worst case scenario ;-)

Once I detected the bad colors, I chose similar colors (mostly with similar names) as replacement, to keep changes as little as possible, for historical reasons.

PS.: By the way, I also use the tsdh-dark-theme. Before, I barely could see math scripts ^ and _ in that theme.

Miguel.


Em qui., 8 de ago. de 2024 às 16:04, Christopher Dimech <dimech@gmx.com> escreveu:
> Sent: Friday, August 09, 2024 at 6:48 AM
> From: "Arash Esbati" <arash@gnu.org>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: "Miguel V. S. Frasson" <mvsfrasson@gmail.com>, "Tassilo Horn" <tsdh@gnu.org>, auctex-devel@gnu.org
> Subject: Re: Some font faces have poor contrast
>
> Christopher Dimech <dimech@gmx.com> writes:
>
> > Did you apply the contrast ratio metric to reach good standard for
> > visibility ?
>
> The metric we used was "before vs. after" which you can see here:
>
>   https://lists.gnu.org/archive/html/auctex-devel/2024-07/msg00076.html
>
> Best, Arash

You did not use any metric.  Metrics require calculation of numerical measures.
What looks good to you might not look good enough to others.

Introspect this

https://www.24a11y.com/2019/color-theory-and-contrast-ratios/



--
Miguel Vinicius Santini Frasson
mvsfrasson@gmail.com

reply via email to

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