PNG8 is a great compressed format when we don't really need semi-transparency. Often an asset will have semi-transparency data that we're happy to lose in the export process, however Photoshop defaults a white background behind the semi-transparent pixels. This causes problems if the png is not going to be displayed on a white page:

Transparent zombie Shows up as: Crappy zombie

Where it would be convenient to export something like:

Slightly better

Is there a way to base the computed color of the semi-transparent pixels off a value other than white?

  • 1
    Found the answer to this about 20 seconds after posting: just change the matte color
    – RSG
    Commented Jan 8, 2013 at 4:17
  • You should add that as an answer and then mark it as correct. Commented Jan 8, 2013 at 4:50
  • I guess there's a 2 day waiting limit to prevent pumping up my own score :)
    – RSG
    Commented Jan 8, 2013 at 7:08

2 Answers 2


Found the answer to this about 20 seconds after posting: just change the matte color: Change the Matte Color


You can't.

When output from Photoshop's "Save for Web" feature, PNG-8 uses indexed transparency, like a GIF. You can get close by setting the Matte color to a similar color to the background your graphic will be on, but it won't be an actual Alpha-Transparency output. (You will still see the halo of anti-aliased pixels if you put the graphic on a background of a different color.)

Fireworks, however, does allow you to do alpha-transparency in an 8-Bit PNG, although the partially transparent pixels will render as COMPLETELY transparent in older browsers that don't support alpha transparency (IE 6).

24 and 32-Bit PNGs support true alpha transparency...and every browser more modern that IE6 supports them, so unless you need to support IE6, you can use them safely. They also have better/smoother anti-aliasing, because they don't use indexing, so the transition is typically smoother.

  • Thanks for the extra info. My question was specifically about getting a good color match for indexed transparency, I guess I just didn't know the proper terminology :)
    – RSG
    Commented Jan 9, 2013 at 23:42
  • 1
    It's also possible to save a PNG24 from Photoshop (24bit RGB with 8bit alpha) and use ImageAlpha to convert that to PNG8 with 8bit alpha. pngmini.com Commented Jan 10, 2013 at 3:32
  • Thanks for the great resource. PNGMini looks like a great tool. Commented Jan 15, 2013 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.