W3C home > Mailing lists > Public > www-style@w3.org > September 2010

Re: CIE color definitions in CSS3 color module

From: Alexis Shaw <alexis.shaw@gmail.com>
Date: Sun, 12 Sep 2010 10:50:37 +1000
Message-ID: <AANLkTik=4M1zOP+fcayFLi2G+oR_F6fd2=34+cBR6704@mail.gmail.com>
To: Christoph Päper <christoph.paeper@crissov.de>
Cc: "www-style@w3.org list" <www-style@w3.org>
On 11 September 2010 21:49, Christoph Päper <christoph.paeper@crissov.de>wrote:

> Alexis Shaw:
> >
> > A CIE XYZ color definition.
>
> This will certainly not make it into level 3 of the Color module, but I
> guess you would be fine with level 4, too.
>
> We only have HSL, not HSB/HSV or HSI and neither chroma-based HLC or HVC,
> so why should there be more than one kind of CIE color definitions?
> (Actually, I think CSS Color should define a syntax for every common system
> there is, but make only certain ones mandatory.)
>
>  hsi(<hue>, <saturation>, <intensity>)
>  hsv(<hue>, <saturation>, <brightness>)
>  hlc(<hue>, <lightness>, <chroma>)
>  hvc(<hue>, <brightness>, <chroma>)
>
> As far as I understand color spaces and definitions,
> - RGB is how screens build up colors (or close to it),
> - CMYK is how printers build up colors (or close to it),
> - HS* are compromises between how screens and people handle colors,
> - CIE *** describe what colors people can see.
>
Please note that they define ALL the colors that people see.

> Is there a point to be made in favor of luma (or luminance) based YUV/YIQ
> or xvYCC/YCbCr …?
>
>  ycc(<luma>, <blue chroma>, <red chroma>)
>
> > xyz(x, y, z)
> > where x, y and z are the floating point values of the CIE 1931 XYZ color
> space
>
> Are x, y, z normalized to a certain interval, like [0, 1], [0, 100] or [0,
> 255]?
> If this was not done usually, would it be okay for CSS to do so?

X, Y and Z colours are normalised as values so that Y is between 0 and 1 in
the ICC profile standard, and between 0 and 100 in the CIE standard. this
means that X and Z can be reasonably be in [0,2) and [0, 200) respectively.

>
> > xyy(x, y, Y)
> > where x, y, and Y are the floating point values of the CIE 1931 xyY color
> space.
>
> How does Y differ from z? If it’s a simple transformation, why would you
> need two separate ways?
> Are x, y, Y normalized to a certain interval, like [0, 1], [0, 100] or [0,
> 255]?
> If this was not done usually, would it be okay for CSS to do so?

xyY derived from XYZ by the following.
x = X/(X+Y+Z)
y = Y/(X+Y+Z)
Y = Y and Y is relative luminance. as above
x-[0,1]
y-[0,1]
Y-[0,1] / [0,100] as above.
this is useful as Y is a lumanance value, and the xy chromacity diagram is
well known

> > luv(L*, u*, v*, white_point)
> > where L, u, v are the floating point values in the CIELUV colorspace.
> > lab(L*, a* , b*, white_point)
> > where L*, a*, b* are the floating point values in the CIELAB colorspace
>   luv(<lighntess>, <u*>, <v*>)

 lab(<L*>, <a*>, <b*>)
> = lab(<lightness>, <red-green>, <yellow-blue>)
>
>     negative positive
>  a*  green     red
>  b*   blue    yellow
>
> What would be mnemonic names for ‘a*’ and ‘b*’, ‘u*’ and ‘v*’?
> Are L*, a*, b*, u*, v* normalized to a certain interval, like [0, 1], [0,
> 100] or [0, 255]? (<lightness> is a percentage as far as I know, but could
> exceed 100%.)
> If this was not done usually, would it be okay for CSS to do so?
>
L lies between 0 and 100 normally, but may be higher for speculative white.
a*, and b* have no theoretical maximum values but are norrmally restricted
as being between -100 and +100, you need to have greater than 8bit precision
for these, so a +-xxx.xxx value for these representing a signed 16 bit fixed
point value should be fine.

Luv values have the following properties.
L lies between 0 and 100 except for speculative highlights.
u* and v* between -100 and +100 in most images.

> What about LCH?
>
>  lch(<lightness>, <chroma>, <hue>)
>
> Is it important to have the whitepoint specified by the author or could CSS
> safely select one? Could it at least be optional. I’d suggest a default of
> ‘D50’ (whatever that means, but according to Wikipedia Photoshop and ICC use
> this one).
>
> <whitepoint>
> > One of the CIE standard illuminates
> > A, B, C, D50, D55, D65, D75, F1-12,
>
> Is that ‘F1’ through ‘F12’ or ‘F1-12’?
>
> > the following common illuminants
> > UL_3000, TL80, A_T8
>
> Are the underscores important? (Authors tend to not get them right.)
>
> > the following black body format.
> > xxxxxK
>
> Do the 5 ‘x’ stand for anything, like random digits from 0 through 9?
>
> > or a custom white point defined by an @whitepoint rule.
>
> What properties / descriptors would this have?
> Can you describe your standard and common illuminants with this (also
> ‘xxxxxK’)?
>
all white points can be defined as a color in the XYZ color space. the
xxxxxK white point color can be derived with the plankian locus

personally All of these colorspaces have there uses, but at a minimum you
will need XYZ, and Lab.

also we will need a way to clamp colours that cannot be expressed in the
colorspace of the display.
Received on Sunday, 12 September 2010 00:51:10 GMT

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