W3C home > Mailing lists > Public > www-style@w3.org > November 2011

[css4-color] HLC <= CIE-La*b*

From: Christoph Päper <christoph.paeper@crissov.de>
Date: Tue, 15 Nov 2011 15:56:58 +0100
Message-Id: <26D3BF14-2358-4A8F-BD81-06C1AFE2324C@crissov.de>
Cc: Kevin Bortis <kevin@bortis.ch>
To: W3C Style <www-style@w3.org>
Kevin Bortis:
> Someone might think that CSS should implement CIE-XYZ but I personally think that would be a bad idea, becouse CIE-XYZ was specified to mathematically describe almost every possible color, but it does not match the human eye, it is bigger.

If the problem with (s)RGB is the arbitrary limit imposed by technical restrictions, why should we choose arbitrary limits imposed by biological restrictions instead of the whole deal? Just kidding.

> The transformation from CIE-L*C*h to CIE-L*a*b:
> L = L	a = C * cos(h)	b = C * sin(h)
> L = L	C = sqrt(a^2+b^2)	h = arctan(b/a)
> 
> "RAL Design(TM)". The values printed on the cards are in the format
> HLC which is a lot easier to use in practice than LCh.

HLC seems fine enough. It is reminiscent of HSL, though, therefore some authors will assume simple conversions like

  hsl(a, b, c) ⇒ hlc(a, c, d)

> em { color: hlc(240, 80, 15) }	/* light blue */

That’s repeating the mistake from HSL in CSS3.

  hlc(<angle>, <percentage>, <percentage>)

  hlc(240deg, 80%, 15%)
  hlc(0.667turn, 0.8, 0.15)
  hlc(267grad, 204, 38) …

> To extend the color pallete from the current sRGB color space. A new CIE-L*C*h color pallette should be created

Maybe, but a user-friendly verbose systematic one, not reusing the stupid X11 names and values.

> em { color: rgb(aliceblue) }
> em { color: aliceblue 1 }    /* aliceblue = #F0F8FF, alpha 1 */

That’s unnecessary and not backwards compatible.

> Because every color can have an alpha channel, the alpha channel should be seperated from the color itself.

That makes no sense. Authors now have learned that they need to add an ‘a’ to the color system pseudo function name if they want to specify a translucent color.

  hlca(<angle>, <percentage>, <percentage>, <percentage>)
Received on Tuesday, 15 November 2011 14:57:42 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:46 GMT