Basically, the browser thinks it's looking at a malformed hex number and strips the invalid chars, in this case turning “red” into 00ED0. This is padded with 0s until it's divisible by 3, giving 00ED00.
[0]http://stackoverflow.com/questions/8318911/why-does-html-thi...