3

I have an white icon that needs to be colorized to a specific color. How do I do it in GIMP?

Keep in mind that it has semi transparent borders and transparent background, so using the bucket or selections is a no-go.

Also, I would appreciate if someone could extend the answer to "how to paint something that's has transparent borders without tools that use thresholds?", as this has been a question to me for a long time, and I really hate non seamless alternatives, like thresholds and feathering.

This is the icon: http://i.stack.imgur.com/4yMhn.png

enter image description here

  • Presuming that this tool works the same way it does in photoshop: docs.gimp.org/en/gimp-tool-hue-saturation.html ( and then just go crazy with the hue slider... ) – Joonas May 13 '13 at 7:33
  • That will not change white colors. And nevertheless, I need something that colorizes to a specific color. Trial and error is not an option =( – emi May 13 '13 at 7:40
  • Can you give us an example of the icon as it is, and of what you'd (approximately) want it to look like? It's kind of hard to tell from your description what you actually mean. (I'm visualizing a white shape on a transparent background, but I suspect that's not what you really mean.) In any case, I suspect that the answer will involve layer masks, and possibly Color to Alpha, but it's hard to be sure. – Ilmari Karonen May 13 '13 at 18:18
  • It is indeed white shape on transparent background. I'll edit the post. – emi May 14 '13 at 5:12
3

What you want to do is change the color of the image while keeping the transparency intact. The solution is simple: turn the transparency into a layer mask.

Specifically, with your example image, follow these steps:

  1. Open the image in GIMP. Change the color mode to RGB (Image → Mode → RGB).

  2. Convert the transparency to a layer mask (Layer → Mask → Add Layer Mask..., choose "Transfer layer's alpha channel" in dialog).

  3. By default, you'll be editing the layer mask after adding it. Switch to editing the layer content either using the menu (uncheck Layer → Mask → Edit Layer Mask) or simply by clicking the left thumbnail in the Layers dialog.

  4. Paint whatever color of texture you want the logo to have over the layer content, e.g. using the Bucket Fill tool (with "Fill whole selection" selected).

  5. Save the result as PNG, optionally after reapplying the layer mask (Layer → Mask → Apply Layer Mask). If you don't apply the mask, GIMP will do it automatically when exporting to PNG (and will pop up a dialog saying so).

Depending on what you paint over the layer content, the result might look something like, say, one of these images:

Red RGB plasma Landscape

2

If the logo is on a transparent background, then set the alpha-lock for the layer (checkerboard icon in the Lock: line at top of layers list). You can then bucket-fill (or use the Blend tool...) the whole layer (without using a selection) with the required color, pixels will keep their transparency/opacity.

enter image description here

With your image:

enter image description here

1

Just use Colors->Map->Color Exchange. Then select white as "From color" and whatever you want to change it to as "To color". Here as an example I changed your picture to red:

red logo

  • This is indeed a nice feature, however it doesn't works that well with gradients and fuzzy borders, even when using thresholds. I'm using another approach, which isn't perfect either, but I'll post it as an answer anyways. – emi Jul 14 '13 at 19:27
  • @esauvisky Maybe you should post the icon you actually want to manipulate then. As you can see, for the example you had it worked pretty much perfectly. – Christian Jul 14 '13 at 20:54
0

The best way I've found to do it is using HSV and Colors->Colorize, but it's still imperfect:

  1. Grab the Hue and Saturation values for the color you want.
  2. Go to Colors->Colorize and set Hue and Saturation to these values.
  3. Manually fiddle with Lightness until it reaches the color you want.

At least this way you avoid color and border artifacts.

0

Keep it even more simple but do not restrict your coloring options.

Make a work copy of your shape layer and turn its brightness to 50% grey by Color > Curves or by Color > Levels

Add a new top layer (=Color) with the blending mode = Hard light or Color. Fill that layer with the wanted color, gradient or image pattern. I made green fill.

Merge the greyed shape layer and the color layer when you're ready. If you want add new layers without merging, the color layer affects everything below it. That can also be avoided by adding a layer mask.

enter image description here

0

Alpha-lock is usually simpler, but another simple solution:

  • On initial layer: Layer>Transparency>Alpha to selection
  • Hide initial layer
  • Add new transparent layer, and paint it using the selection obtained above.

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.