W3C home > Mailing lists > Public > www-validator-css@w3.org > May 2009

Re: Orange not a valid color value

From: Philip TAYLOR <P.Taylor@Rhul.Ac.Uk>
Date: Sun, 17 May 2009 09:32:59 +0100
Message-ID: <4A0FCBBB.7090601@Rhul.Ac.Uk>
To: "Jukka K. Korpela" <jkorpela@cs.tut.fi>
CC: Rick Bull <rick@rickbull.com>, www-validator-css@w3.org

Jukka K. Korpela wrote:

 > The morale? Well, don't use color names. They aren't a particularly good
 > idea anyway. Use a color picker to select the color you want (say,
 > _some_ orange color) and use the numeric value in some format allowed by
 > CSS syntax. Use "CSS Validator" or other linter to check that those
 > values are technically correctly written, among other things.

I don't entirely agree with this, Jukka (the assertion that colour
names are not a good idea, that is).  Whilst I might have
considerable reservations about suggesting the use of (say)

	background-color: soilent-green /* PANTONE 7488 */

I would have no similar reservations about the use of (say)

	background-color: blue

That is, where the colour names refer to a simple primary
colour, they seem completely unexceptionable to me (also
"black" and "white", even though they are neither simple
nor primary).  But where the colour names refer to arbitrary
points in the colour spectrum, then in the absence of
a single universal mapping from RGB space to meaningful
colour names, I agree that (at the moment [1]) the use of
numeric constants is probably preferable.

Of course, what I would really like is for CSS to
provide the ability to bind colour names to RGB space,
but I think that by now it is fairly universally agreed
that the CSS model makes this extremely difficult
to implement.
Received on Sunday, 17 May 2009 08:33:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:40:45 UTC