MonkeyX, I kinda assumed he would separate the r, g and b components out when doing the calculation.
One thing I should point out with this method is that it will not find the colour you would get by mixing two pigments of the colours, it merely gives you the colour in the middle of the two on an RGB colour wheel, to get an approximation of that would be a little more complicated and would probably involve converting the RGB values to another (subtractive) format, averaging those values and converting back to RGB.