Mobile app version of vmapp.org
Login or Join
RJPawlick971

: Photoshop: How to use a non-white background as the basis for semitransparent layers in PNG8 export? PNG8 is a great compressed format when we don't really need semi-transparency. Often an asset

@RJPawlick971

Posted in: #AdobePhotoshop #Compression #Png #Transparency

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:

Shows up as:

Where it would be convenient to export something like:



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

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @RJPawlick971

2 Comments

Sorted by latest first Latest Oldest Best

 

@Karen819

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.

10% popularity Vote Up Vote Down


 

@RJPawlick971

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

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme