Color attributes in HTML have special processing.
It seems that some pages use three-digit notation and expect it to work as in CSS. I've made the algorithm do that and I've drafted up a spec for this:
http://simon.html5.org/specs/html-color-attributes -- Simon Pieters Opera Software