Why is the color ramp in the compositor treating my transparent pixels as black? I have a scene that renders to black, white, and grey pixels, with some transparency in between. Here's what that looks like:

When I use the following color ramp configuration:

I get rid of the black and am only left with the white, and the transparent background:

This is fine, and what I intended to do. But, when I try to do the same with the white instead, and change the color ramp configuration to this:

(ie, I set the lighter side's color alpha to 0) It doesn't work, and I get this:

It seems that the color ramp is equating any pixel with alpha values of 0 to black pixels. Though I'm really not sure what's going on. Excluding the pictures because this post feels long enough as is, but I did test an additional modification: when I change the white tab to black on the last color ramp I posted (keeping alpha at 0), the resulting picture is the same as the last one I posted, except the white areas are transparent. So it is possible to get the lighter pixels to turn transparent with the color ramp, but that still doesn't solve the problem of having the black pixels and transparent pixels in the original render treated the same (ie as black pixels).
Sorry if this is worded a little awkwardly, I'm not totally sure of how to explain the issue I'm having. I'd be happy to clarify anything. I've been trying to figure this out for hours, any help would be appreciated.
...and yes, shame on me, big Blender community, i did not answer the question &quot;why is the colorramp....&quot;, but hopefully it is useful for stillsleep and that's what he wanted to achieve.
If i understand you right, you want to

convert black to transparent

convert white to transparent


if yes, here is the node setup:
Original:


convert black to transparent



convert white to transparent


and just in case you wanna make both transparent, black and white, you can use this setup: