Other than blending values of different color types directly, the following outline the mathematics for each blending method.
Each forumla is applied to each RGB value pair individually—that is, the R values of the first and second colors are blended separately from G and B. In other words, a, b, and c below are equivalent to a^i, b^i, and c^i where i=[R,G,B] for the following forumlae. Values of c are clamped to ∈[0,1].
Instead of blending alpha, alpha is used as the amount of blending. Or, the blended result c^ is then blended with the first source color a^ by the amount of the alpha channel where a^alpha∈[0,1].
method
formulae
screen
c=1−(1−a)(1−b)
multiply
c=a⋅b
overlay
c={1−(1−a)(1−b)a⋅b if b≥0.5 otherwise
colordodge
c=1−ba
colorburn
c=1−a1−b
vividlight
c={1−ba1−a1−b if b≥0.5 otherwise
lineardodge or addition
c=a+b
linearburn
c=a+b−1
linearlight
c={a+ba+b−1 if b≥0.5 otherwise
divide
c=ba
subtraction
c=a−b
difference
c=∣a−b∣
softlight
g={((16a−12)⋅a+4)⋅aa if a≤0.25 otherwise
c={a+(2b−1)(g−a)a−a(1−2b)(1−a) if b≥0.5 otherwise