After poking at the code, I think it must be something about the way Firefox (at least earlier versions) handles the #rgb color format. It works fine as long as all the three-digit hex codes are replaced with six-digit ones. Or when I feel like upgrading my browser :p