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

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.

Jo

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


>Hello,
>
>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
>http://www.htmlsource.f2s.com/stylesheets/namedcolours.html
>
><quote>
>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.
></quote>
>
>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
>
>--
>wendy a chisholm
>world wide web consortium
>web accessibility initiative
>seattle, wa usa
>/--

Received on Monday, 14 January 2002 19:45:36 UTC