Mobile app version of vmapp.org
Login or Join
Pope1402555

: How to colorize a layer with semi transparent borders to a specific color in GIMP? I have an white icon that needs to be colorized to a specific color. How do I do it in GIMP? Keep in

@Pope1402555

Posted in: #ColorConversion #Gimp #Transparency

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: i.stack.imgur.com/4yMhn.png

10.06% popularity Vote Up Vote Down


Login to follow query

More posts by @Pope1402555

6 Comments

Sorted by latest first Latest Oldest Best

 

@Dunderdale640

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.

10% popularity Vote Up Vote Down


 

@Bethany839

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.

10% popularity Vote Up Vote Down


 

@Lee3735518

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.



With your image:

10% popularity Vote Up Vote Down


 

@Eichhorn212

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:


Open the image in GIMP. Change the color mode to RGB (Image → Mode → RGB).
Convert the transparency to a layer mask (Layer → Mask → Add Layer Mask..., choose "Transfer layer's alpha channel" in dialog).
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.
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).
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:

10% popularity Vote Up Vote Down


 

@Pope1402555

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


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


At least this way you avoid color and border artifacts.

10% popularity Vote Up Vote Down


 

@Martha945

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:

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme