Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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|cite|improve this question
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|cite|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 :

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


share|cite|improve this answer

Your Answer


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.