Re:Why does HTML think “chucknorris” is a color? (2011)
by oneeyedpigeon on Sunday November 03, 2013 @04:35AM
(#6662665)
Don't beat yourself up about it: 'gray' is a perfectly legitimate US-English variant of the British-English 'grey'. In fact, 'Gray' is actually correct according to the spec (I had to look it up, and remember making this very mistake in the old days, which makes sense given that I'm British) I have a vague recollection that the 'misspelling' was actually handled differently between browsers.
Re:Why does HTML think “chucknorris” is a color? (2011)
by Amadou on Sunday November 03, 2013 @06:38AM
(#6662859)
So, you are saying this is a gray area?
(somebody had to say it)
Re:Why does HTML think “chucknorris” is a color? (2011)
by toupeira on Sunday November 03, 2013 @12:44PM
(#6664136)
Yep, Firefox supported both spellings while IE displayed green for 'grey'.
Re:Why does HTML think “chucknorris” is a color? (2011)
by minikites on Wednesday November 06, 2013 @12:32PM
(#6683911)
I've heard it described as, "gray is a color, grey is a colour"
Re:Why does HTML think “chucknorris” is a color? (2011)
by dhughes on Sunday November 03, 2013 @12:41PM
(#6664117)
To me "gray" just seems wrong, grey feels right.
Re:Why does HTML think “chucknorris” is a color? (2011)
by Samuel_Michon on Sunday November 03, 2013 @04:43AM
(#6662682)
Actually, in HTML, ‘grey’ is wrong, ‘gray’ is correct.
“There are several tones of grey available for use with HTML and Cascading Style Sheets (CSS) as named colors, while 254 true greys are available by specification of a hex triplet for the RGB value. All are spelled gray, using the spelling grey can cause errors. This spelling was inherited from the X11 color list. Internet Explorer's Trident browser engine does not recognize grey and renders it green.”
http://en.wikipedia.org/wiki/Grey#Grey_in_the_sciences.2C_na...
Re:Why does HTML think “chucknorris” is a color? (2011)
by lemonberry on Sunday November 03, 2013 @05:12AM
(#6662722)
I grew up playing Dungeons and Dragons in the early 80's. The world you played in was Greyhawk. As a result, even though I'm from the US, that shade between black and white will always be grey.
Re:Why does HTML think “chucknorris” is a color? (2011)
by samatman on Sunday November 03, 2013 @10:30AM
(#6663466)
Not only that, my mother starts every morning with a cup of Earl Grey. I never had a chance!
Given the title of the "world's most popular novel", I'd count on this spelling becoming normative over time.
When I first started writing HTML, I would set colours using the english colour names, for example color="red" or color="white" and this worked well for my needs.
However, I would always get an odd result when I tried to set the colour grey. Turns out, I didn't spell very well (I was pretty young at the time, though still spell atrociously).
<font color="gray">
And the colour would come out green. What?
I quickly realised my spelling error but wondered why things ended up green. I decided what was happening was that the interpreter read the colour name up until the first invalid character (in this case resulting in "gr"), then chose the closest match. Green would be before grey in alphabetical order and... voila!
I see now the solution was simply that gray was interpreted as 00 a0 00. Another life mystery solved!