I once had someone make me a program, i doubt i could do it myself even now. I know the mathematics, but the drawing routines are beyond my programming at this point.
I don't have my text file that I had but let's see if i can repeat the process...
a color is made up of RGB values, each ranging from 0 to 255. Take each one seperately, subtract the smallest from the largest to get the difference.. multiply this difference by the opacy (0 to 1.00) and if the smallest was the back color, add the smallest. If the smallest was the forecolor, subtract this from the largest. or something like that.
Then repeat for green and blue.
It's beena while and I can't find my text file where I had it all figgured out, but play around with this in paint with a calculator and you'll figgure it out. I'm gonna try to find that text file.
Found it.
Let R = the value of Red. R1 is bottom color, R2 is top color
P = Percentage of R2 to show through R1.
1 2 3 4

If (R1 >= R2)
R = (R1R2) * (P*0.01) + R2;
else
R = (R2R1) * ((100P)*0.01) + R1;

Repeat for G and B (green and blue)