Change hue/color of icon using image magick
You can use the -modulate option to change the hue of an icon, but it does not, for some unknown reason, preserve the icons alpha channel. So here is the command line option to change the hue of an icon while preserving the alpha channel:
convert icon.png -modulate 100,100,50 -alpha off icon.png -compose CopyOpacity -composite PNG32:output.png
The last option to the modulate option changes the hue. Change it from 50 to whatever you want to get the hue you want. A value of 100 will leave the hue unchanged.
From the image magick documentation:
The hue argument causes a “rotation” of the colors within the image by the amount specified. For example, 50 results in a counter-clockwise rotation of 90, mapping red shades to purple, and so on. A value of either 0 or 200 results in a complete 180 degree rotation of the image. Using a value of 300 is a 360 degree rotation resulting in no change to the original image