W3C home > Mailing lists > Public > w3c-wai-gl@w3.org > January to March 2002

Re: [CSS-TECHS] numbers instead of names?

From: Jo Miller <jo@bendingline.com>
Date: Mon, 14 Jan 2002 19:45:18 -0500
Message-Id: <p05100305b8692c106ed6@[]>
To: w3c-wai-gl@w3.org
Hi Wendy,

I cannot verify the statement, though I suspect it is true, with 
qualifications. Any browser that supports CSS1 would support support 
the 16 color names you note from the CSS1 spec. However, I do not 
know that all CSS2-supporting browsers support all 140 colors in HTML 
Source's list, or that they would map those names consistently to the 
same RGB values. (Will all current browsers map Papayawhip to 
#FFEFD5? No comment on "indianred.")

When this subject came up a year ago, Kynn suggested that we amend 
the recommendation to say "use the
16 named colors defined by CSS level 1, or use RGB colors" [1]. This 
suggestion still seems reasonable to me.


[1] http://lists.w3.org/Archives/Public/w3c-wai-gl/2000OctDec/1053.html

>In relation to, "Use numbers, not names, for colors."
>I'm trying to answer the question, "'red' maps to rgb(255,0,0), so 
>what's bad about it?"
>The main reason not to use color names and to use either rgb triples 
>or hexadecimal codes is that older browsers will not recognize color 
>names.  However, that is for specifying colors in the deprecated 
>font element, right?
>The CSS1 spec lists the following color names:
>aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, 
>purple, red, silver, teal, white, and yellow
>HTML Source lists 140 names
>These are in the stylesheet section because older browsers will not 
>recognise the words, they require the code. Any browser that can do 
>stylesheets can do these colours, so it's safe to use them if you're 
>using a style.
>Can anyone verify that this statement is true? If so, then we can 
>get rid of the statement since font in HTML is deprecated and color 
>names in CSS would be supported.
>wendy a chisholm
>world wide web consortium
>web accessibility initiative
>seattle, wa usa
Received on Monday, 14 January 2002 19:45:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 16 January 2018 15:33:40 UTC