For example we have 2 transparency layers: first is black (0, 0, 0, 0.75)
and second is white (255, 255, 255, 0.64)
. I don't know how to blend them.
But I know how to blend one opaque and one transparent layers. It's look like this: https://wikimedia.org/api/rest_v1/media/math/render/svg/1e35c32f13d5eedc7ac21e9e566796dd048a31e6
Assume that the background colour is
(C, 1)
(RGB, A), the first layer is(A, s)
and the second layer(B, t)
. Applying the blending equation twice:We can see that the new effective blending coefficient is
1 - (1-s) * (1-t)
. To get the combined transparency colour, divide the first term by this:i.e. the new effective transparency layer is given by
(D, r)
.In your example the values would be
D = (179, 179, 179)
andr = 0.91
.