W3C home > Mailing lists > Public > www-style@w3.org > October 2006

Re: CSS color palettes

From: David Woolley <david@djwhome.demon.co.uk>
Date: Mon, 30 Oct 2006 07:56:23 +0000 (GMT)
Message-Id: <200610300756.k9U7uOl02331@djwhome.demon.co.uk>
To: www-style@w3.org

> If you want to read an argument for its use you can browse to my blog: 
> http://damianvila.wordpress.com/2006/10/23/css-color-palettes-2/

You need to give the essence of the use case here; some people read
mail offline.

> Maximum number of colors and sub-palettes is 255 (ff).

I don't think arbitrary limits are desirable.

> Sub-palettes and colors can be referenced either by its keyword (red, 
> bright-green) or by id-number (!00, !0a, !ff, !127).

! is not available for new uses.

> If no palette is specified or the wrong name for palette or color is 
> given, the agent internal palette or color for that object is used.

Particularly for palettes, this is inconsistent with the general
policy on fallback, which is to ignore invalid values completely,
so as to allow an earlier rule to provide the fallback.

For colours, the fallback rules are already defined.

> If color number is used, by changing the sub-palette name the color 
> scheme will cascade. If color definition is changed, all elements using 
> that color keyword will cascade.

I think what you mean is that the colour number (palette index) is the
computed value in this case.  Given that hardware palette support is
essentially obsolete on the desktop and probably becoming obsolete on
mobile devices, this can require recomputing the used value of colour for
a large part of the document.

> Color array number can be specified either in decimal or hexadecimal. 

I can see no benefit in allowing hexadecimal.  The use for colours
is really only there for backward compatibility with pre-CSS methods
(still endemic!) which only allow hexadecimal.

> !color-palette { /* "default" color palette */

! needs to be @

> color00: #800000 "maroon";

Having something that looks like a keyword but isn't (it's indexed) is
likely to be a problem for parsers and may confuse users.

If "maroon" is supposed to be a comment, you have used the wrong syntax.
If it is supposed to be a name, quotes are not (normally at least) used
for colour names.

> color01: #ffc "light-yellow"; /* background */

Colour associations with functions should be done by class selectors at
the point of use.  To the extent this is about alternative palettes for
the whole document, this whole function can be achieved using alternative
style sheets with no paletted mechanism.
Received on Monday, 30 October 2006 07:57:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:47 GMT