Re: CNS colors

Wolfgang Rieger writes:
 > On Fri, 2 Feb 1996 11:48:30 +0100, H&kon wrote:
 > 
 > >Chris Lilley has brought to attention a color naming scheme that fits
 > >neatly into CSS. CNS is described in [1]. The basic components of CNS
 > >are:
 > >
 > > hues: red, orange, yellow, green, blue, purple, brown, white, gray,  black
 > > 
 > > saturation: grayish, moderate, strong, vivid (vivid is default)
 > >
 > > lightness: very dark, dark, medium, light, very light (medium is default)
 > >
 > (etc.)
 > 
 > In a follow-up Chris Lilley has given some details which make the
 > color scheme and the process of transforming a CNS color spec to RGB
 > appear rather complicated (in my eyes).

Hmm. There is an EBNF grammar in the cited article, so parsing is
simple; conversion to RGB involves a single 340-entry lookup
table. This is complicated?

 > I was looking for something simple and widely available and found the
 > color selection dialog of MS-Windows. This dialog lets you specify
 > color by giving three quantities named hue, saturation and lightness
 > and a mapping of these colors to RGB. 
 > 
 > The mapping is not documented 

by Microsoft. It is widely documented elsewhere, as are it's many
problems.

[lengthy (complicated, even) transformation to RGB omitted. Available
in any standard reference - Foley & Van Dam, etc. It is also
documented in the cited CNS article - which you have read, or course?
;-) ]

 > 1.	It is really simpler to specify hue, saturation and lightness
 > 	than to specify RGB values.

Yes. Especially if lightness really does correspond to how light
something appears - a desirable property, I'm sure you will agree. Try
calculating the HLS values of blue (RGB 0000FF) and yellow (RGB
FFFF00) and tell me - which *looks lighter*. HLS assigns them the same
lightness. This is clearly totally incorrect.
 
 > 2.	It is simple to implement.

Not especially simple (though not rocket science either); slightly
more complicated than CNS or Netscape/X11 named colors.

 > 3.	Nearly everybody has a utility to look at and fiddle with 
 > 	colors so specified, namely the MS-Windows color selector 
 > 	dialog. Still one could use this or some other tool for
 > 	color selection and then put the resulting RGB values into
 > 	the HTML file.

Or one could put a more meaningful value in the HTML file. For example
if one wanted a light, vivid yellow one could write 'light vivid
yellow' into the style sheet.

 > It has one big disadvantage: it is wrong (i.e. it disagrees with
 > nearly everything that we know about the physics of color and
vision).

Ah yes, there is that. The CNS system proposed has the big advantage
that is is right (ie it agrees with nearly everything that we know
about the physics of color and vision). In particular: lightness
really is lightness, hue realy is evenly spaced perceptually, it has
actually been tested in a controlled trial (against RGB and the HSV
system proposed by Rieger) and the CNS system was found to be
statistically superior to both RGB and to HSV.

--
Chris Lilley, W3C                          [ http://www.w3.org/ ]
http://www.w3.org/people/chris/                       INRIA/W3C
chris@w3.org                       2004 Rt des Lucioles / BP 93
+33 93 65 79 87            06902 Sophia Antipolis Cedex, France

Received on Tuesday, 23 April 1996 04:35:18 UTC