[PATCH v3] css: Support for dark mode

Samuel Lidén Borell samuel at kodafritt.se
Sun Jan 29 17:07:50 UTC 2023


On Fri, 27 Jan 2023 14:42:58 -0600, "Jason A. Donenfeld" <Jason at zx2c4.com> wrote:

> It still feels like the table shading is now way too dark in dark
> mode. For all those various grays, there might be some transformation
> to consider where you want the same distance from black that it
> formerly had from white.

Good point. I've fixed this and I will send v4 shortly. It is the same distance now (in the RGB value). Other improvements:
* The .list table background is fixed.
* Support for non-media-query-supporting browsers in syntax-highlight.sh also.

I agree it would be nice to have an automatic transformation, i.e. darkcolor=f(lightcolor). Unfortunately I don't know how to do that. Color is a quite tricky subject because RGB is non-linear, and some colors (e.g. green #00ff00) are perceived as brigther than others (e.g. blue #0000ff). In fact, v1 of the patch was simply an inversion + re-sorting of the RGB components (to preserve nuance), and the looks of that was sub-optimal.

Regards,
Samuel


More information about the CGit mailing list