I want to be able to take two RGB-256 vectors and calculate the result of their mixture. Also I want to be able to give each vector a different weight. I've experimented with it using the Word color plate, and I've seen that while some colors do mix according to a weighted average:

0.5*red(255,0,0) + 0.5*yellow(255,255,0) = orange(255,127,0)

others don't:

0.5*yellow(255,255,0) + 0.5*blue(0,0,255) = gray (127,127,127) and not green (0,255,0)

Is there an algorithm for accurate calculation for all colors or am I forced to do it using a look up table?

Edit
Report