[Top][All Lists]

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

RE: solarized

From: Drew Adams
Subject: RE: solarized
Date: Thu, 17 Sep 2020 15:56:23 +0000 (UTC)

> RS> By inverse I mean, the color that is to white as color X is to
> RS> black.  I don't know what formula is needed for that, but I
> RS> presume someone does.
> I think it is something that could be described as
>       the value of each member of the inverse triplet is #FF minus
>       the value of the corresponding member in the original triplet,
>       that is "computes the complementary color"
> but I fear that other things impact on the perception of the colors,
> i.e. the monitor settings, cultural background (don't be surprised, it
> is human perception after all, and it's strongly influenced by
> psycological components including the name you give to colors, see the
> Himbas in Africa, and Japan - I think that they see shades of grue

There is the human-perception consideration.
And as others have pointed out, that is heavily
influenced by things such as ambient lighting.

As for color complementing, without taking such
perception considerations into account, there
is already existing Emacs code for getting the
complement (inverse, if you prefer) of a color.

There are functions to complement each of hue,
saturation, and value.  There are functions to
complement all (the combination) together, for
color name, RGB numeric, or RGB hex values.

Standard library color.el has only the latter
(fixed combination formula, based on RGB/name).
Library hexrgb.el has all of them.


reply via email to

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