1

I need to replace the color of some PNG icons. Examples:

JavaScript shall become JavaScript2 http://www168.lunapic.com/editor/working/146856450596963-bt-5.

YAML1 shall become: YAML2 http://www168.lunapic.com/editor/working/146856450596963-bt-10.

Only color replacement: orange → violet, orange → green, and no other actions.

I never worked before with the advanced graphic editors, whether I can carry out replacement of colors?

Any non-commercial graphic editor for Windows would be fine (not Photoshop).

  • 1
    In Gimp: docs.gimp.org/en/gimp-tool-hue-saturation.html When you got the Hue-saturation window open, just adjust the hue slider like a crazy person and you should see the colors change. – Joonas Jul 15 '16 at 10:33
  • 1
    @Joonas: Shouldn’t that be an answer? – Wrzlprmft Jul 15 '16 at 10:34
  • @Joonas, thank you very much! Please, publish your comment as the answer that I could accept the answer and raise your reputation. – Саша Черных Jul 15 '16 at 10:57
3

In Gimp:

  • Open the document
  • Open Hue-saturation tool ( Instructions )

    • When you got the Hue-saturation window open, just adjust the hue slider like a crazy person and you should see the colors change.
  • 1
    Two other options would be to use the rotate colors and color exchange features. For a simple single color image, the hue-saturation tool works in a pinch, but might not be appropriate for more complicate changes. – Scribblemacher Jul 15 '16 at 11:40
1

In ImageMagick or GraphicsMagick:

mogrify -fuzz 50% -fill violet -opaque "#F4BF75" *.png

I used "identify -verbose file.png" to display the histogram and determine that #F4BF75 is the predominant orange color present.

The fuzzing is needed because your samples are antialiased and have a variety of approximately orange colors present. You can omit "-fuzz 50%" and then the results will have orange halos like the results you posted.

0

if the white in your icons is actually transparency:

  • Set the alpha-lock for the layer (checkerboard icon at top of layer list)
  • Make sure you have no selection
  • Bucket fill with new color, the alpha-lock will protect the transparent pixels (actually, it will make sure all pixels keep their initial opacity).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.