|
|
Photoshop soft light mode
| |
Description:
This mode has nothing in common with the hard light mode (except for its name),
but the result is similar to overlay mode.
Formula:
f(a,b) = |
2 * a * b + a2 * (1 - 2 * b) (for b < ½) |
sqrt(a) * (2 * b - 1) + (2 * a) * (1 - b) (else) |
Disadvantage:
There is a separate formula for bright and for dark base colors,
so there is a (small) discontinuance for b = ½ (diagram 1 can be sparated into two parts - the discontinuance is only visible in diagram 2 because it is that small).
Code:
|
|
|
Pegtop soft light mode
| |
Description:
This mode has nothing in common with the hard light mode (except for its name).
It is very similar to the Photoshop soft light mode, for dark blend colors it is identical, for bright ones it differs a bit.
It does not share the disadvantage of the Photoshop soft light mode.
Formula:
f(a,b) = (1 - a) * ab + a * [1 - (1 - a) * (1 - b)]
or
f(a,b) = (1 - a) * multiply(a,b) + a * screen(a,b)
or
f(a,b) = 2ab + a2 - 2a2b
or about
f(a,b) = |
a - (½ - b) * [½ - (½-a)2] (for b < ½) |
a + (b - ½) * [½ - (½-a)2] (else) |
Code:
|
|
|
|
|
|
|