Change only Bright (lighten)
The formula is: Max (A, B)
It's just a big brightness, nothing to say.
Top floor |
Underlying |
After mixing |
#50 50 50 |
#9f BE 1c |
#9f be 50 |
From this example, it can be seen that the algorithm is a separate operation for each channel
Masking (color filter)
The formula is: 255-comp (a) *comp (b)/255
It is because the red part is always less than 1, so the minuend will be less than comp (b), so the Cmop (b*) is the equivalent of becoming smaller, thus b* become larger and brighter.
Top floor |
Underlying |
After mixing |
80 80 80 |
154 185 24 |
186 207 96 |
255-175*101/255
Ans =
185.6863
255-175*70/255
Ans =
206.9608
x=0:255;
Y= (255-x). * (255-100)/255;
Plot (x, Y, ' R ')
On
Plot (x,255-y, ' B ')
Axis ([0 255 0 255])
Grid on
Look at the blue part, set the original for the bottom of 100, when top layer is 0 o'clock the top layer of the complement is 255, at this time B*=255-comp (b), the equivalent of no change, and when top layer is 255 when the top of the time-out 0, at this time b*=255 equivalent to achieve great.
Dodge (Color Dodge)
The formula is: A+a*b/comp (b)
The odd thing about this formula is that the coefficient of addend is a, and the reason for this is that the difference in brightness varies from one pixel to another, and the feeling is richer.
x=0:255;
Y=100+100*x./(255-x);
Plot (x, y)
Axis ([0 255 0 255])
Grid on
Add (Linear simple)
Formula: A+b
This is nothing to say, more simple than the filter, the same color as the Dodge can not be pulled out of the rhythm.
x=0:255;
Y=100+x;
Plot (x, y)
Axis ([0 255 0 255])
Grid on
formulas for various blending modes (collected from the network)
Layer Blending mode study (partial)