Texture2D still visible when drawn with alpha level set to zero

I’ve been working on creating my own image editor using Monogame, and ran into a problem when trying to implement transparency. So far, the way I have the program display an image is by reading a bitmap from a file, creating a 2D array of “Pixel” objects and assigning the color value of the pixels from the bitmap to the Color value property of each Pixel object, which will be used when the pixels are drawn, like this:

batch.Draw(Texture, new Rectangle(/position calculation code here/), Shade));

…where “Texture” is a single white pixel, and “Shade” is the color property of the Pixel. This displays the colors exactly right, but I can’t get the alpha parameter of the Color class to work the way I thought it would.

For instance, if I draw a 50 by 50 grid of pixels like this:

batch.Draw(Texture, new Rectangle(/position calculation code here/), new Color(r: 0, g: 0, b: 0, alpha: 0));

…then nothing shows up, as expected.

But if I do this:

batch.Draw(Texture, new Rectangle(/position calculation code here/), new Color(r: 0, g: 255, b: 0, alpha: 0));

…even though the alpha level is zero, a translucent green square appears. And it seems that the closer the color is to white, the less translucent it gets, so this:

batch.Draw(Texture, new Rectangle(/position calculation code here/), new Color(r: 255, g: 255, b: 255, alpha: 0));

…shows up as a completely opaque white square. I’m getting that this has something to do with the fact that the blank texture I’m using to draw the pixels is white, but I can’t think of any other way to do this. Any ideas?

Had similar issue here Alpha blending problem? and solved by multiplying all r,g,b values by the alpha value for the tint colour.

Yep, that solved the problem, thanks.