A combination of screen and multiply mode, depending on the base color.
||2ab (for a < ½)|
|1 - 2 * (1 - a) * (1 - b) (else)|
There is a separate formula for bright and for dark base colors,
so there is a discontinuance for a = ½ (diagram 1 can be sparated into two parts).