I was experimenting blending modes in the 'Fill and Stroke' and got confused when I change the alpha values. It would be great if you can direct me to a document which clearly shows the equations used but I believe going over an example may help a lot.
My experiments are like that:
Experiment 1:
* I open a blank document
* I draw a square, filled with RGBA of (255, 0, 0, 255), chosen selected mode is 'Normal'
* I draw another square on top of the old one, filled with RGBA of (128, 0, 0, 64), chosen selected mode is 'Multiply'
What I expected to see is:
Foreground colour: 0.5 (amount of R in top square) x 0.25 (amount of Alpha) x 1 (amount of R in bottom square) = 1/8
Background colour: 1 (amount of R in the bottom square) x (1-0.25) (It means 1-alpha) = 3/4
The resulting colour is 7/8 of red (df0000) and that's what I see in Inkscape.
Experiment 2:
* I open a blank document
* I draw a square, filled with RGBA of (255, 0, 0, 255), chosen selected mode is 'Multiply'
* I draw another square on top of the old one, filled with RGBA of (128, 0, 0, 64), chosen selected mode is 'Multiply'
Essentially the same as Experiment 1 but only one change, the blending model of the bottom rectangle is changed to Multiply. I get a colour of (a70000). It is 21/32. But I could not find how it is calculated. Should changing the blending mode for the bottom shape affect the top one? If it is supposed to do so how is it calculated?
Hello everyone,
I was experimenting blending modes in the 'Fill and Stroke' and got confused when I change the alpha values. It would be great if you can direct me to a document which clearly shows the equations used but I believe going over an example may help a lot.
My experiments are like that:
Experiment 1:
* I open a blank document
* I draw a square, filled with RGBA of (255, 0, 0, 255), chosen selected mode is 'Normal'
* I draw another square on top of the old one, filled with RGBA of (128, 0, 0, 64), chosen selected mode is 'Multiply'
What I expected to see is:
Foreground colour: 0.5 (amount of R in top square) x 0.25 (amount of Alpha) x 1 (amount of R in bottom square) = 1/8
Background colour: 1 (amount of R in the bottom square) x (1-0.25) (It means 1-alpha) = 3/4
The resulting colour is 7/8 of red (df0000) and that's what I see in Inkscape.
Experiment 2:
* I open a blank document
* I draw a square, filled with RGBA of (255, 0, 0, 255), chosen selected mode is 'Multiply'
* I draw another square on top of the old one, filled with RGBA of (128, 0, 0, 64), chosen selected mode is 'Multiply'
Essentially the same as Experiment 1 but only one change, the blending model of the bottom rectangle is changed to Multiply. I get a colour of (a70000). It is 21/32. But I could not find how it is calculated. Should changing the blending mode for the bottom shape affect the top one? If it is supposed to do so how is it calculated?