Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
1  
Found the answer to this about 20 seconds after posting: just change the matte color –  RSG Jan 8 '13 at 4:17
    
You should add that as an answer and then mark it as correct. –  Lèse majesté Jan 8 '13 at 4:50
    
I guess there's a 2 day waiting limit to prevent pumping up my own score :) –  RSG Jan 8 '13 at 7:08

2 Answers 2

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.

share|improve this answer
    
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 Jan 9 '13 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 –  Marc Edwards Jan 10 '13 at 3:32
    
Thanks for the great resource. PNGMini looks like a great tool. –  Jon Sandruck Jan 15 '13 at 14:55
up vote 3 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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