W3C home > Mailing lists > Public > www-style@w3.org > July 2015

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

From: Nikita Vasilyev <me@elv1s.ru>
Date: Tue, 14 Jul 2015 13:32:19 +1000
Message-ID: <CAJ-YAs2gA_JxwOHBwx+sNu0k7OwYC1PsZ5ZBzc=Y4zQOcaD0hw@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
On Tue, Jul 14, 2015 at 6:16 AM, Tab Atkins Jr. <jackalmage@gmail.com>
wrote:

> On Thu, Jul 9, 2015 at 11:13 PM, Nikita Vasilyev <me@elv1s.ru> wrote:
> > I propose to add HCL color scheme to CSS.
> >
> > "The Hue-Chroma-Luminance (HCL) color space is based on how the human
> > perception works. When using HCL, you can directly control the color
> (hue),
> > the colorness (chroma) and the luminance (brightness).”
> > – Why HCL? http://hclwizard.org/why-hcl/
> >
> >
> > HCL is supported by d3.js:
> > "D3 supports CIELAB (Lab) and CIELCH (HCL) color spaces, which are
> designed
> > for humans rather than computers.
> >
> > Lab and HCL color spaces are special in that the perceived difference
> > between two colors is proportional to their Euclidean distance in color
> > space. This special property, called perceptual uniformity, makes them
> ideal
> > for accurate visual encoding of data. In contrast, the more familiar RGB
> and
> > HSL color spaces distort data when used for visualization."
> > – Mike Bostock, https://gist.github.com/mbostock/3014589
>
> Amusingly, Mike Bostock has another page describing the HCL rainbow as
> "ugly" <http://bl.ocks.org/mbostock/310c99e53880faec2434> ^_^
>
> 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.
>
> ~TJ
>

HCL is very useful for choosing colors with the right amount of
contrast between
them, e.g. picking a readable text color for a given background. I believe
this is essential for web design.

WCAG 2.0 defines a contrast formula and it's based on a relative luminance (
http://www.w3.org/TR/WCAG20/#contrast-ratiodef). It would be very helpful
to have a color scheme that has luminance as one of its dimensions.

While I can see CubeHelix being useful, I find having HCL is more important.
Received on Tuesday, 14 July 2015 03:33:08 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:52:18 UTC