Re: Cascading Style Sheets

On Dec 1, 12:05pm, Neil St.Laurent wrote:

> Harry Hersh wrote:
> > .. Because it makes much more sense for users.

I certainly concede that polar systems have been shown in numerous
evaluations to be superior to rectangular coordinate systems for both
speed of initial match and for closeness of final match to an arbitrary
test color.

> > Compare for example,
> > trying to specify a color such as "pink" using RGB vs HLS. With HLS,
> > it is easy to think of pink as a somewhat lighened and desaturated
> > red.

OK, and it's numerical HSL value is ...

And the numerical HSL values of a baby blue and a creamy yellow of the
same lightness is ... (this is a trick question). Try it, if you have an
application that lets you mix colors in HSL. Notice that the "L" values
are *not* the same, not even a bit off - they are quite different.

> > Now try describing the same color using RBG: how much blue and
> > green must be added, and red reduced to obtain pink?

Right. I agree it is hard. That is why I would use a tool to do it.
Having selected a color visually, I would then have the CMS convert it
from the visual appearance of color space of my monitor with my gamma
under my viewing conditions to a color appearance in a standardised
monitor space with a standardised gamma under standardised viewing
conditions (sRGB); these values would be written into the CSS file.

I expect that this is why almost all CSS editing tools that I have seen
provide a visual color picker, eyedropper or drag-and-drop,  rather than
a type-in box to specify color.

> Well, there is an inherent problem with what you said.  Great I may
> know how to increase read to become pink under HLS, but the problem
> no lies in determining what Red is?

Yes. Actually the name red covers quite a range of hue angles in the
HLS system, which is not perceptually uniform.

> I another color model is added I'd hope that it would be in line with
> L*a*b rather than anything else, since if I recall correctly, this
> model is capable of representing the widest range of colors.

It is capable of representing the entire human visual gamut (as well
as 'colors' outside that ;-) which can be a problem.

It is also (reasonably) perceptually uniform. For instance, two colors
with the same L value will appear to have the same lightness. However
CIE LAB is a rectangular coordinate system; as noted above this is less
desirable than a polar system. There is a polar equivalent of CIE LAB,
called CIE LCH; actually this was most likely the model for the original
HSL/HSI specifications, the defining papers for which were published
in 1978-79, a couple of years after the 1976 CIELAB/CIELUV/CIELCH
definitions.

A problem with LAB is that it does not take viewing conditions into
account (more precisely, it specifies a standard set of viewing
conditions which are unlikely to be met in practice). Another problem
is that it is not perfectly perceptually uniform; although much better
than RGB or HSL, better systems yet have been developed in the last
decade.

So: currently, CSS1 provides a single color model with defined semantics,
and the accuracy with which that color is represented on a particular
implementation can bephysically  measured with instruments. CSS2 uses
the same model.

Users can select colors using any method they wish, including selection
from a palette of colors, Pantone numbers, natural language descriptions
in their native language, whatever. All of these should be converted at
authoring time into sRGB and written into the stylesheet as per CSS1.

-- 
Chris Lilley, W3C                          [ http://www.w3.org/ ]
Graphics and Fonts Guy            The World Wide Web Consortium
http://www.w3.org/people/chris/              INRIA,  Projet W3C
chris@w3.org                       2004 Rt des Lucioles / BP 93
+33 (0)4 93 65 79 87       06902 Sophia Antipolis Cedex, France

Received on Monday, 1 December 1997 15:42:26 UTC