Re: [css-color] Add HCL (aka Lch) color scheme

On Wed, Jul 22, 2015 at 2:56 AM, Chris Lilley <chris@w3.org> wrote:
> Monday, July 13, 2015, 10:16:51 PM, you wrote:
>> Amusingly, Mike Bostock has another page describing the HCL rainbow as
>> "ugly" <http://bl.ocks.org/mbostock/310c99e53880faec2434> ^_^
>
> Not really seeing the relevance of that to this issue, which is about
> adding LCH (and of course Lab) to css4 color. LCH(ab) is simply the
> polar form of Lab:
>
> C = sqrt(a^2 + b^2)
> H = atan2(b, a)
>
> Frankly the main obstacle to my putting these in CSS color 4 - which I
> intend to do - is what would be a good syntactic form, how to do
> fallback, etc. SVG had these already, with an sRGB fallback. It was
> dropped from SVG2 because they would be better in CSS so they could be
> used for HTML/CSS as well.
>
> Having got such a space, *one* of the things one can then do with it
> is produce an even-perceptual-spacing color scale for scientific
> visualisation. Note the scientific - the point there is to avoid
> hiding or exaggerating small changes in the underlying visualized
> values.
>
> "Prettiness" is a non-goal in that situation - and if desired, with
> bright saturated non-evenly-spaced colors, its easy to do in RGB or
> HSL.

Note that CubeHelix was invented to *do* scientific visualization in a
way that was attractive and had good perceptual qualities, in
particular good even-and-monotonic lightness change.

(I'm not against exposing Lab, whether in rectangular or polar form.
But we do have to prioritize built-in color functions; we can't add
everything, and as Houdini develops and exposes custom CSS functions,
adding new color functions via a small, simple JS library will be
pretty easy.)

>> I am currently (slowly) working on turning the CubeHelix rainbow into
>> something usable as a CSS color system.  It's intended to be the basis
>> of a new named color system, but it should be useful as an HCL-like
>> system as well, that's hopefully a bit more attractive.
>
> You would need to demonstrate perceptual uniformity for it to be
> useful as an LCH-like or Lab-like system.

Other than the slight brightness movement up and down (not perfectly
even like HCL, but not omg-terrible like HSL), the CubeHelix rainbow
is generally similar to HCL in its perceptual properties.  I'm
interested in producing a rainbow because people *do* want to be able
to cycle the hue and get decent results; HCL doesn't give them that,
because at any given lightness, at least some of the colors are ugly.

~TJ

Received on Wednesday, 22 July 2015 16:29:10 UTC