3

I have a number of hex colors (as part of a theme) in say a shade of green. I want to find equivalent colors in another shade say blue.

I would like to set a color and all the colors should automatically become equivalent to that shade.

UPDATE

I believe I have to convert the RGB to HSL and then shift it accordingly (between -180 to 180).

Alec Smart
  • 94,115
  • 39
  • 120
  • 184

1 Answers1

1

You need to convert from RGB to HSV and for the resulting HSV values just alter the H (hue) value to change the base color.

Alin Purcaru
  • 43,655
  • 12
  • 77
  • 90
  • Had to write a lot of JS to convert HEX to RGB to HSV and then modify the value of H and reverse the whole process. – Alec Smart Feb 22 '12 at 12:04