CSS Color name proposals

A summary of named color proposals spurred by the debate over the CSS 3 color module inclusion if X11 Named Colors. Please post feedback and comments to the www-style@w3.org

Proposal: extensible color name profiles

Originally suggested to CSS Working group mailing list at http://lists.w3.org/Archives/Public/www-style/2002May/0203.html by Dylan Schiemann and influenced by http://lists.w3.org/Archives/Public/www-style/2002May/0144.html

CSS2 has the following:
color: keyword; (inherit, transparent, systemColors, etc.)
color: namedColor;
color: #ff0;
color: #ffff00;
color: rgb(255,255,0);
color: rgb(100%,100%,0%);

CSS3 proposes adding:
color: x11NamedColor;
color: attr(X,color);
color: rgba(255,255,0,1);
color: hsl(%,%,%);
color: hsla(%,%,%,#);

If css 3 is adding color-profiles, why not consider adding color-name-profiles, such as:
color: profile(profileName,colorValues,profileURI)

with the profileURL optional, containing a translation table to sRGB, or a set of functions (one for each of several commonly used programming languages).

Thus, all could be expressed as:

color: profile(keyword,inherit);
color: profile(html4,blue,url());
color: profile(rgbHex,#ff0);
color: profile(rgbHex,#ffff00);
color: profile(rgb,255,255,0);
color: profile(rgb,100%,100%,0%);
color: profile(x11,orange,url());
color: profile(rgba,100%,100%,0%,1,url());
color: profile(hsl,100%,100%,0%,1,url());
color: profile(hsla,100%,100%,0%,1,url());
color: profile(cns,orange,very dark,vivid,url());
color: profile(crayola,electric lime,url());
color: profile(com.dylanschiemann.www.customColorNames,Lincoln Log,url());

Some of these are of course ridiculously longer than using the shorter syntax.

Browsers could be required to be able to convert colors using a lookup table for named colors, or read the method for that browsers language of choice to do rgb conversions.

I would think this should be optional, but would be very useful for using a standard css syntax for authoring programs. For example, a Dreamweaver like program could offer custom color palettes from a company such as Crayola, create a color picker which would store the colors in this new css syntax, and then offer an rgb export conversion if most browsers did not support this optional color name profile.

Proposal: CNS Colors

Refer to CSS Working group thread at http://lists.w3.org/Archives/Public/www-style/1996Feb/0006.html for Proposal by Chris Lilley.

Proposal: HSL Adjectives

Refer to CSS Working group thread at http://lists.w3.org/Archives/Public/www-style/2001Mar/0098.html for Proposal by Dylan Schiemann.

Leave a Reply