Re: How to make a single color image with white alpha layers into white transparent p
Ahh, now I understand what you are getting at. I don't think you'll be able to achieve exactly what you want. I think that the best you can do with a single layer (plus its alpha channel) is something like this:
Have the alpha channel carry the saturation information so that higher saturation maps into more transparency of the layer so that more of the (presumably fully saturated) underlying solid color layer shows through. In regions of low saturation, only the B&W (ie, unsaturated) image layer is visible.
The luminosity info would then have to be carried on the B&W layer itself. It's easy to see the problem that this causes. Suppose you want to produce a bright or a dark region with maximum saturation. In this region of the image, the alpha channel would be telling the B&W layer go transparent so as to achieve maximum saturation. However this means that in this region, the luminosity of the B&W layer would be ignored. The luminosity of the result would then be nothing different than the luminosity of the solid color layer. Put differently, you would lose luminosity info in regions of maximum saturation.
OK, so this approach obviously isn't going to work. What are our other alternatives?
One alternative might be to not have the alpha channel ever go to fully transparent. This would allow some luminosity info to get through (the problem with the previous approach), but it introduces lots of other problems. For example, it would prevent fully saturated colors from being displayed.
Another possibility is to think about having the alpha channel carry the luminosity info and the layer itself carry the saturation info. Well, I think it's immediately obvious that isn't going to work, either.
Another alternative might be to use multiple layers, each with it's own alpha channel, say, an all white layer, an all black layer, and one or more solid color layers, all with the same hue. I think one would be able to get a much better approximation of the brightness and saturation variations in the original image with a system like that, but that doesn't give you what you asked for: exactly one layer with one alpha channel.
This is why in mathematics, many proofs begin by first demonstrating an existence theorem. In this case, you obviously don't have this because you are effectively asking us to provide you with an "existence theorem", ie, provide you with just one example where what you asked for can be demonstrated to be possible.
HTH,
Tom
PS - The reason that my previous post described a method that didn't use an alpha channel was that I was pretty certain you couldn't get exactly what you asked for, so I described an approximate one layer method that at least wouldn't look too bad: The hue and luminosity information in the result would perfectly match the original, but the saturation would be constant throughout the image. As mentioned above, if you allow more layers, even that limitation could be removed.