gif html png spng
000000
111111
222222
333333
444444
555555
666666
777777
888888
999999
AAAAAA
BBBBBB
CCCCCC
DDDDDD
EEEEEE
FFFFFF
The above is 4 versions of the same color table
  • a GIF
  • raw html
  • a PNG
  • a Super PNG with the embedded SRGB color profile Note that on different browsers, the PNGs have different gamma corrections applied to them, and rarely match the colorspace that CSS/HTML uses. Since it's different browser to browser, PNGs are not a good choice for images where it's important to match the color of the surrounding HTML.
    In Particular, 3 prominent mac browsers all rendered these differently.
  • Safari applied a gamma "correction" to the png, making it darker than the HTML from which it was taken. Safari also applied an even darker gamma to the super PNG.
  • IE 5.5 applied a darker gamma to the PNG. Super PNG and PNG were treated the same.
  • Only Mozilla Firebird (and any Gecko based browser - Mozilla, Netscape 6/7, Camino) applied a gamma to the PNG which made it match the HTML colorspace. Only there are the colors consistent. It's debatable which approach is most correct. This link explains how PNG's gamma correction was doomed to begin with.
    Here are screenshots of the different Mac browsers: