# How to apply the difference between 2 colors to another color?

I have 2 objects that differs in color (Dark / Light variant).

I want to create the same 2 objects but in another color scheme (Red, Green, Orange, Purple, ...)

This can normally be done by chaning the hue value of both images. I would then have something like the following:

However, I do have the light color available in all color schemes and I have the darker version only in the blue scheme.

So basically I want to calculate how much darker the darker variant of the 'Blue' is, and apply this to all the other 'light' colors that I do have.

How can this can be accomplished?

• I'm not following. Can't you check the values in a graphic software with an eyedropper tool and use that value? Jun 2, 2016 at 9:29
• I can check it with an eyedropper tool, but I guess my question was not to clear. I have 2 colors (Light / Dark). Now, I want to change the "hue" of both colors to have green instead of blue, but I do know the HEX value of the "Light" variant. So, basically, I need to calculate the difference between 2 existing colors, then take another color, and generate a darker variant of that color that's equal in difference. Have i made myself more clear? Jun 2, 2016 at 9:37
• You haven't made yourself more clear at all. I don't follow why Luciano's suggestion doesn't work for you.
– Ryan
Jun 2, 2016 at 10:06
• Luciano is right. I've double checked it. My mistake. Thanks. Jun 2, 2016 at 10:39
• Could either you or @Luciano please leave an answer and mark it correct so this doesn't get bumped by the SE Bot as an unanswered question
– Ryan
Jun 2, 2016 at 10:50

Here's how to do what you want to do.

Use the eyedropper with %-ages instead of HEX values unless you work in base-16 math. : ) I don't.

When you have read the difference in your test (blue) case, use the same differences for the rest of your hues. That's it.

Light Blue to R=57.3, G=75.3, B=87.8

Dark Blue to R=16.5, G=55.3, B=83.1

Subtract the neutral density from your patches by subtracting the least value from all three values. (I've emboldened the lowest values to subtract.)

You'll get these values.

Light Blue to R=0, G=18, B=30.5

Dark Blue to R=0, G=38.8, B=66.6

Do you see that the Green is nearly doubled in value, and so is the Blue.

Now, let's see what you did with the Red.

Light Red to R=85.5, G=57.3, B=87.8

Dark Red to R=78.8, G=16.5, B=83.1

Subtract the neutral density from your patches by subtracting the least value from all three values. (Again, I've emboldened the values to subtract from the others.)

You'll get these values

Light Red to R=28.2, G=0, B=30.5

Dark Red to R=62.3, G=0, B=66.6

Do you see that the Red has more than doubled in value as has the Blue? Both sets of patches increased by the same amount.

Using these numbers, you can sample any hue and increase or decrease the non-neutral primaries to produce any similar proportional difference. You could use the hex values in the same way but unless you have a hex-based calculator like I do, it will be painful but possible to do the same thing.

You're entirely welcome.

• I realize this was 6 years ago, but I'm poring over this now, trying to figure out how to calculate things just as the OP asks, and I don't quite see how this does it. Firstly, I'm much more comfortable working with RGB values 0-255. I see that in both of the OP's examples, we have the minimum values for the ND as 146 (57.3%) for the light color and 42 (16.5%) for the darker one. What I don't understand is, given a random new light color, how do you calculate the darker color with the same proportional difference? For example... (continued) Jun 21, 2022 at 2:11
• (continued) ... Let's say my light color is 224,236,143 (a pale yellow). How do I get the corresponding dark color that has the same difference as the OP's light blue and dark blue? Jun 21, 2022 at 2:12
• Yea this was an interesting read but I found it pretty hard to understand how percentages help you create a new color. What I tried was to normalize the sample colors to percentages for rgb. Then I took the ratios of those colors and applied them to my source color to try and get a new color that had the same relationship. It didn't work at all. Sep 30, 2022 at 17:53

I agree with the comments above that the accepted answer isn't the easiest to understand but I saw what the poster was trying to achieve.

In the following image I have the BLUE base color and I used HSB to determine the differences between the central and lighter/darker versions.

Then given the centre RED and YELLOW colors I was able to determine the lighter and darker shades by adding or subtracting the difference.

The only issue was when B went over 100 for the light shades but max 100 seems to give an acceptable result.

This is the resulting pallet