Jump to content
cdytoby

How to make a white transparent background for icon?

Recommended Posts

For some reason, we need icon/texture with transparent background, and this transparent background needs to be white instead of black or something else.

You can check this article, this is the reason we need this: http://www.adriancourreges.com/blog/2017/05/09/beware-of-transparent-pixels/

Now, my workflow in Affinity Designer is, an icon, and a white transparent rectangle at back, center the icon with the rectangle, then export it to png using file->export.

The way I test it, is using XnView MP to open the png, then right click the image viewer, check "use alpha channel". Then the alpha channel will be removed and show the original color.

Problem is, after I export it, the background is black transparent, not white transparent. See screenshots. Screenshot 1 is a home button icon and a transparent rect. Screenshot 2 is the color setting of the transparent rect. Screenshot 3 is the view in XnView, with alpha channel removed.

Then I tested with only a little bit of alpha, by moving the alpha slider a little to right, export it to png, and the alpha is correct white alpha, not black. But it's not the ideal result because it shows a little bit white instead of complete transparent.

How to do white transparent background with Affinity?

screenshot1.png

screenshot2.png

screenshot3.png

Share this post


Link to post
Share on other sites

Hi cdytoby,

Could you attach the .afdesign file for this?

I think i know what is happening, but really need the file to confirm this.  Also the 2nd rectangle you are setting to transparent, is this just being used as a guide, so you get the sizing correct ect?  If so, you could try deleting that and then creating a slice the size of the rectangle you've deleted and exporting that.  

Share this post


Link to post
Share on other sites
On 5/21/2019 at 4:18 PM, stokerg said:

Hi cdytoby,

Could you attach the .afdesign file for this?

I think i know what is happening, but really need the file to confirm this.  Also the 2nd rectangle you are setting to transparent, is this just being used as a guide, so you get the sizing correct ect?  If so, you could try deleting that and then creating a slice the size of the rectangle you've deleted and exporting that.  

Well, yes and no.

The transparent rectangle is used for 2 purposes. 1 is to make sure its correct size, I need the icon have some padding around it. 2 is make sure there is a "white transparent background", so that the visual issue is solved. 

Here, transparent background means, the color code should be (255,255,255,0) instead of (0,0,0,0). Both are not visible and transparent, but the color is different.

I'll attach a afdesign later, because I'm not allowed to upload the whole file.

Share this post


Link to post
Share on other sites
On 5/21/2019 at 4:18 PM, stokerg said:

Hi cdytoby,

Could you attach the .afdesign file for this?

I think i know what is happening, but really need the file to confirm this.  Also the 2nd rectangle you are setting to transparent, is this just being used as a guide, so you get the sizing correct ect?  If so, you could try deleting that and then creating a slice the size of the rectangle you've deleted and exporting that.  

Here is the test afdesign file.

Test.afdesign

Share this post


Link to post
Share on other sites

After I have exported the file to png from Affinity, I open it in XnView MP and from the view menu make sure Use Alpha is checked, this is what I see
Screen-Shot-2019-06-04-at-19-54-18.png


iMac 27" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Affinity Designer/Photo, Publisher Beta 1.7.0.140, Illustrator CC, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Artist-22E, - iPad Pro 12.9 B|  

Affinity Help - Affinity Desktop Tutorials Instagram & Flickr - Affinity Live 19th June 2019

Share this post


Link to post
Share on other sites

I think it has something to do with 8bit indexed attributes, as the use transparent index is greyed out but checked.


iMac 27" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Affinity Designer/Photo, Publisher Beta 1.7.0.140, Illustrator CC, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Artist-22E, - iPad Pro 12.9 B|  

Affinity Help - Affinity Desktop Tutorials Instagram & Flickr - Affinity Live 19th June 2019

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×