Friday December 24, 2004
|
| What color do you see? | Computers |
When is grey not grey? When you're viewing it with Internet Explorer, that's when.
The following words should match their color: blue red gray green grey
With most browsers, the word "grey" is the color grey. But when viewed with Internet Explorer on XP, I see it colored green! You might assume that the parser sees "gre" and assumes "green" but the color displayed is a lighter shade of green that what is displayed for the the word "green" (did that make sense?).
The following code was used to display the colored words above:
<font color="blue">blue</font> <font color="red">red</font> <font color="gray">gray</font> <font color="green">green</font> <font color="grey">grey</font>
I'd be interested in hearing people's explanation for this. I did find
this link that
describes the same behavior, but doesn't offer any insight.
Tags:
December 24, 2004 12:57 AM PST
Permalink
| Comments [5]
|
Posted by Trevor Watson on December 24, 2004 at 01:26 AM PST #
Okay, I learned a lesson and will check even simple pages with several browsers.
But here's an interesting link from seven years ago!
A quick test shows that many obscure names for both existing and non-existing color names are translated similarly by Mozilla and IE, but also there are several different interpretations.
Go figure!
Posted by Renne Tergujeff on February 25, 2005 at 12:58 AM PST #
IE tries to interpret unknown colour names as a RRGGBB hexidecimal number, treating all non-hexidecimal digits as zero. It then seems to pad with extra zeros to get six digits.
So "grey" => 00e0 => 00e000
=> red=0, green=E0=16*14=224/255, blue=0
=> green!
Posted by Tom on February 07, 2008 at 09:19 AM PST #
Comments are closed for this entry.
©
Kevin Chu, Some Rights Reserved.
This work is licensed under a Creative Commons License. Sun Microsystems Trademarks are in effect.
All opinons are mine! Mine! Mine! Mine! Sun Microsystems has nothing to do with them.
