We need some more variables so I'll get rid of the periods here from line 15 and also the perc * which is easier to do later:
If mixColor1 = "g" Then
color1G = maxGreen
ElseIf mixColor1 = "p" Then
color1R = maxRed
color1B = maxBlue
ElseIf mixColor1 = "w" Then
color1R = maxRed
color1G = maxGreen
color1B = maxBlue
Do the same for the next section. Then:
color1.G = perc * color1G + (1.0-perc) * color2.G
and so on for color1 and color2.