95
hm... regarding to
http://en.wikipedia.org/wiki/Alpha_compositing#Alpha_blending
solution provided by Andras Zoltan should be slightly changed to:
Source => Target = (BGColor + Source) =
Target.R = ((1 - Source.A) * BGColor.R) + (Source.A * Source.R)
Target.G = ((1 - Source.A) * BGColor.G) + (Source.A * Source.G)
Target.B = ((1 - Source.A) * BGColor.B) + (Source.A * Source.B)
This changed version works fine for me, because in prev. version rgba(0,0,0,0) with matte rgb(ff,ff,ff) will be changed to rgb(0,0,0).