Equivalent of GIMP's "Color to Alpha"?

Talk about Pixelmator Pro, share tips & tricks, tutorials, and other resources.
User avatar

2019-08-30 22:05:33

I'm liking Pixelmator, but there's one feature from GIMP that I'm missing - and I'm not quite sure how to do the same thing in Pixelmator.
Gimp has a "Color to Alpha" option, which is useful to easily remove a colored background from an image, while also preserving anti-aliasing.
You'll have to zoom in quite a bit to see any of what I am trying to show.
Also keep in mind, the color may be any solid color - blue, heliotrope, whatever. With GIMP, it just works...
Example: I start with the following (zoomed in) anti-aliased image:
Image
And a couple of clicks in GIMP, and I get an image with the White changed to transparent -- and the anti-aliasing remains correct.
Image
(If you put a black background behind the layer, it stays all black, because there are no "white" pixels there -- there are only the black and alpha/black pixels:
Image
With Pixelmator, I seem to have to choose between less effective options, where I either end up using the select color tool, which will select too much (or not enough) of the black text -- either leaving "grey" pixels from anti-aliasing, or removing the anti-aliasing altogether. As far as I've been able to use it, masks have the same problem too.
The image below has "gray" pixels on the top of the text, and the bottom loses all anti-aliasing:
Image
The gray pixels on top are a problem, because they can be visible if put on a black background, like so:
Image
If I use masks, I can get _some_ anti-aliasing, but it's not the same anti-aliasing as the original, with the difference between the original and the "mask to transparency" shown below:
Image
So... what is the correct way to change the "white" (or any color) so it's transparent, and it preserves the full anti-aliasing in the same way as GIMP?
So... what's the correct way to get the white (or any color) background pixels to be made transparent -- and preserving anti-aliasing in the process? It's easy in GIMP, but I haven't found how to do it in any version of Pixelmator.
User avatar

2019-08-31 10:29:34

Hi Troy.
My go-to tool for transferring RGB information to opacity is Mask to Alpha (Effects > Other > Mask to Alpha). This will take the intensity of a pixel and put it in the alpha channel. You can then use this layer as a clipping mask or load it into a selection and create a layer mask from it.
If I understand the Color to Alpha feature correctly you'd have to do some colour processing on the layer (possibly Hue Adjust followed by Black & White) to make the specific colour white (and everything else black) first.
Hope this helps.
- Stef.
User avatar

2019-08-31 14:53:16

by st3f 2019-08-31 10:29:34 Hi Troy.
My go-to tool for transferring RGB information to opacity is Mask to Alpha (Effects > Other > Mask to Alpha). This will take the intensity of a pixel and put it in the alpha channel. You can then use this layer as a clipping mask or load it into a selection and create a layer mask from it.
If I understand the Color to Alpha feature correctly you'd have to do some colour processing on the layer (possibly Hue Adjust followed by Black & White) to make the specific colour white (and everything else black) first.
Hope this helps.
- Stef.
Your guess about how to do “color to alpha” in GIMP is not correct. All I have to do is choose the option, and then I can use an eye dropper tool to select the color.

Combining it with a simple selection & grow, it's dead simple to go from this
Image
Using this
Image
And getting this
Image
User avatar

2019-08-31 18:08:50

Hehe. I still think I know what you mean. I just didn't express myself clearly enough. Let me add some qualifiers to that sentence:
If I understand GIMP's Color to Alpha feature correctly then to replicate the effect in Pixelmator Pro you'd have to do some colour processing on the layer (possibly Hue Adjust followed by Black & White) to make the specific colour white (and everything else black) first.
Quick Select would be my first choice for an image like this in Pixelmator Pro, though. I think it has a more pleasing edge than Select Color and processing the image to use Mask to Alpha seems like overkill here.
Image
A few more clicks than Color to Alpha, though. That sounds like a neat feature.
All the best.
- Stef.
(edit: and I realised that I missed out deselecting two of the sweat droplets so... more risk of human error, too.)