PBC0 = PC0*PA0 + BC*(1-PA0) = PC1*PA1 + BC*(1-PA1)
If you know both PA0 and PA1, you can decide for PC1.
PC1 = (PC0*PA0 + BC*(1-PA0) - BC*(1-PA1)) / PA1
Edit: replace 255 with 1 in the above example if you use the general color convention from 0 to 255.
source share