PDA

View Full Version : How to find the color between 2 given colors?


Kien
09-11-2009, 08:37 PM
I wonder how you get the color that lies in the middle of 2 colors. Like drawing a straight line in color space between 2 points and get the middle point of it, which doesn't work...

If you make a gradient in a photoshop you will not get the real color in the middle of it. The color you get will be darker than what it should be. For example if you make green go towards red, you will not get pure yellow in the middle. You will get yellow with only half value (brightness). This is simply the way gradient tool works.

Here are 2 pictures of the RGB color cube.
https://users.cs.jmu.edu/bernstdh/web/common/lectures/images/rgb-cube.gif
http://mvh.sr.unh.edu/mvhinvestigations/images/color_space.png

If you draw a line between red and yellow you will get orange which is correct. Orange is what you get when you have mix of red and yellow, it lies in the middle of them.

But if you draw a line between red and green you will not get yellow in the middle of the line. You will get a dark kind of yellow since yellow lies in the corner and not in the middle of a straight line between red and green.

Seems tricky. Anyone knows how to do? And if you wonder, this is all just my curiosity. :)

Quadart
09-13-2009, 03:29 PM
You can find the hue that lies in between any two hues by using the HSB color space palette in Photoshop. You also have two color choices when viewing a color wheel. You have a color between the shortest distance as well as the farthest distance arced between two hues on a color wheel. The two in-between hues will be complements of each other.

Create two different colored dots, add the hue values (H) of the two dots and divide by 2. Enter the value in the H slider window and make a dot. This third dot represents the hue that lies between he first two color samples.

*Special case for Red. Red, in the HSB space, has two Hue (H) values, both 0 and 360 (the values represent circle degrees). If you’re going for the hue laying between the shortest distance arced between two colors, use the 0 value for Red when a color has an H value between 0 and less than 180. Use the 360 H value for Red when the H value is greater than 180. At 180 you have two equal choices.

http://i219.photobucket.com/albums/cc156/bill_77/hsb_wheel.jpg

CGTalk Moderation
09-13-2009, 03:29 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.