Consider the following gradient:


Now I create a solid color layer and copy-paste the gradient as its layer mask.

Where the mask is white I got 100% opacity and where the mask is black I got 0% opacity, with a fading in between.

The result looks like this (visibility for the gradient layer is off):

first layer

At this point I duplicate the solid color layer and invert the mask of the new layer (Colors → Invert in GIMP).

What I expect is that the opacity of the new layer should be complementary to the first one, so having the two layers stacked one on top of the other should result in a solid color.

This is what I get instead:

enter image description here

Why is this happening and how to get what I want instead?

  • You are in a very big crowd of people, even the people who have made our vector renderer's fall for this trap. You expect alpha to describe coverage but it in fact defines transparency, which is something else entirely. – joojaa Dec 11 '18 at 17:58

This is expected, opacity is not additive, it is more like multiplicative.

If you want a totally opaque result, your bottom layer should be totally opaque:

enter image description here

|improve this answer|||||

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