Reputation: 8322
I have a picture, i choose a color on the picture like:
#18212d
rgb: 24 33 45
when i colorize that picture by increased hue with 6 (202 => 208), saturation with 4 (25 => 29) (using photoshop), old color above was turned into new color:
#19232c
rgb: 25 35 44
Have any ways to calculate a new color of another old color after colorized? I need that to colorize all my css file.
Upvotes: 0
Views: 507
Reputation: 75456
You need to convert all your colors to HSV, manipulate it and convert it back to RGB. You need to understand how different color system works. This page is a good reference,
http://www.easyrgb.com/index.php?X=MATH
This page lists all the algorithms. You can also find open source code in just about any language you use. For Javascript, Dojo, YUI all have conversion functions built-in.
Upvotes: 1