I used color to alpha many times before with other images and it was perfect but when i try with this image it's give me a weird result that I don't know from where is the problem ? enter image description here the original image with blue back ground

and after i use color to alpha to change blue background to alpha it's become like that

the explosion color changed to yellow

enter image description here

and when i try to doing the same with green back ground i get the same problem

enter image description here

and after color to alpha

enter image description here


2 Answers 2


The "contract" of color to alpha is that:

(result image) over (background of removed color) == initial image

In addition, there is an ambiguity: for instance a gray from which you remove white could be a fully opaque identical gray, or a semi-transparent black. So Gimp picks the solution with maximum transparency, the semi-transparent black in the example or in your case some rather transparent yellow, which, over the background blue, generates the light gray.

To avoid this, make a selection that excludes the areas you don't want to change. Very often this means:

  • select background with fuzzy selection
  • Select>Grow by some pixels (2px in case of hard borders, may be more here)
  • Color-to-alpha (which will only apply to the selected pixels)

Also, C2A is strictly equivalent to painting in Color erase mode, so you can paint just the background with a large brush...


If you carefully inspect your linked documentation page, you see the same behaviour. Your greys, which are really zero saturation fully opaque greys, are considered to be partially blue. That blue is removed, partially transparent low saturation inverse of blue is left. This is how it is programmed to work.

You must use selections or layer mask to remove the background. Here is an example. Magic Wand is used to make the selection and DEL is pressed:

enter image description here

Remaining blue has been desaturated:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.