Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Say I have two Red Green Blue colors (255, 26, 26) and (241, 232, 91) respectively. If I'd like to determine the color halfway between these two colors, how could I solve for it? Is the answer simply the average of each individual color value, or is there more to it?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

In most cases, you do find the average of each of the color channels. There is another type of 'half-way between' for colors, that is half-way between the hues, but since it seems that this effect is not what you're looking for, the average method seems like the most relevant one. If you wish to prove that this is the case, open up your favorite graphics program that can handle gradients, and create one from (241,24,24) to (24,241,24) and check what the center pixel's color is. It should be (133,133,24). This is the average of each color channel.

share|improve this answer
    
Great thanks!!! –  GoldenNewby Feb 7 '12 at 21:50

You should first check you gamma value. The average will be correct only with a gamma of 1 (linear).

The best way is to transform your RGB values in CIE XYZ, the you make the average in XYZ, then you retransform in RGB et voilà!

But make sure your gamma is correct when you transform in XYZ, otherwise it'll not work.

formulae here : easyrgb.com

in RGB to XYZ, the gamma value is after the exponent (^)

Best

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.