Page 1 of 1

Recoloring Green to Red

Posted: 2015-10-02T09:40:55-07:00
by wierdbeard65
Hi,

I have some icons in PNG format which are basically green (with some grey shadows). Unfortunately, I need them in red!

Sample:

Image

The icons all have graduated fills and have a transparent background. I'm banging my head against the wall trying to figure out the appropriate way to do this. A lot of the methods I have found result in a black background (instead of transparent) or mess up the shading.

Can anyone offer me advice on how to achieve this?

TIA

ImageMagick-6.9.2-3-Q16-x64

Re: Recoloring Green to Red

Posted: 2015-10-02T09:50:07-07:00
by fmw42
Your image link is broken. We would need to see your image, to give a good response.

Re: Recoloring Green to Red

Posted: 2015-10-02T09:53:08-07:00
by wierdbeard65
Thanks. (Crazy quick reply, BTW, wow!!!!)
Odd, I uploaded to dropbox, as suggested, and then put link in IMG tags. Here is the link sans-tags.

https://www.dropbox.com/s/l1kefl43e8sqg ... n.png?dl=0

Thanks again!

Re: Recoloring Green to Red

Posted: 2015-10-02T10:04:16-07:00
by fmw42
Try

Code: Select all

convert Computer-Green.png -modulate 100,100,40 result_red.png
Change the 40 as desired for the resulting color. see http://www.imagemagick.org/Usage/color_mods/#modulate

Re: Recoloring Green to Red

Posted: 2015-10-02T12:35:44-07:00
by wierdbeard65
You, Sir, are a Genius!

Thank you so much, EXACTLY what I needed. (I have to be honest, I'd found that reference, but didn't understand it as I'm not a color technician.)

Re: Recoloring Green to Red

Posted: 2015-10-02T12:42:17-07:00
by fmw42
It would have been better perhaps if the hue values were in degrees rather than the range of 0 to 200 with 100 being no change. But one can convert degrees to the needed range if need be. That way one can use a colorwheel and see how much degree change is needed or one could make a colorwheel that is labeled with the IM range. See http://www.fmwconcepts.com/imagemagick/ ... _chart.jpg