You can not depend on the image color of GIFs or PNGs to match the colors embedded in the html page. It doesn't matter if they have the same RGB setting - #EAEAEA in an image will have slightly different color than #EAEAEA as a background in the html.
Assuming you want to solve the problem - which is really a browser bug - you have two options. Either set the transparency of the image to be #EAEAEA, or worse, set the background to an image that has only one color of #EAEAEA. I've used both approaches in the past for some of my pages.