[Top][All Lists]

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

Re: Automatic face setting based on contrast?

From: Alexandre Garreau
Subject: Re: Automatic face setting based on contrast?
Date: Tue, 05 Oct 2021 23:20:30 +0200

Le mardi 5 octobre 2021, 23:15:46 CEST Richard Stallman a écrit :
> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>   > I made this point in the above bug report, but there is no way to
>   > style Emacs with 25-50 face definitions.  It is very hard to put an
>   > exact number on this, as e.g. some faces are inherited and therefore
>   > more important, but realistically speaking you need at least twice
>   > that to have a somewhat decent coverage.
> Is this something that could be fixed, in principle?  Could a theme
> specify some faces manually, and then Emacs would adjust various other
> faces automatically so as to contrast with some of those?
> Currently, a face can inherit properties from another face.
> Could there be a kind of contrast-inheritance where face A
> is set automatically to contrast strongly with B, and contrast
> somewhat with C and D?  Based on calculations on the RGB codes,
> I imagine.
> This would call for a bit of research, but if we got it to work,
> specifying a good theme might become a lot easier.

I think it would be waaaaay more straightforward to use HSL code instead 
of RGB.  RGB is the lowest level possible, but difficult to master as a 
human.  The most meaningful way to specify colors is with HSL, which is to 
me the most high level.  It also looks straightforward to *at least 
intuitively* see some contrast issues with HSL, if either the hue, 
saturation or luminosity are not different enough.  It also enables easier 
not only comparisons in general, but also transformations, shades, etc. to 
be done programmatically

But programmatic faces looks like a terrifically nice feature… somewhat 
like programmatic fonts from metafont from TeX (at least the two areas are 
close, it’s a shame they’re grew so walled from each other).

reply via email to

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