Post Reply 

How to change the color for a logo that has pixels with varying degrees of opacity?

Jul 26, 2011, 02:36
Post: #1
How to change the color for a logo that has pixels with varying degrees of opacity?
Greetings;

Can somebody tell me how to go about changing the color in the image below from green to brown?
   

I can select the pixels that are the same shade of green by using the "Select by Color" tool. Then use the fill tool to fill the selected pixels with brown. I can do that for each shade of green.

But the problem is the lighter shades of green have a lesser opacity. I would have to guess the level of opacity for the fill tool when filling with the color brown.

Is there some way that GIMP can match the opacity exactly for the green pixels so that when I fill with the color brown it will have the same opacity as the green pixel?

Thanks.
Find all posts by this user
Quote this message in a reply
Jul 26, 2011, 06:01
Post: #2
RE: How to change the color for a logo that has pixels with varying degrees of opacity?
well if im correct you could just...
color select all by just holding shift and clicking on the various shades of green
when you have the whole selection ...selected...make a new layer above and then fill, and then you can change the opacity of coarse to whatever you want and add a background layer behind it. hope this helps. G.L.

[Image: MMSSig-2.png]
Find all posts by this user
Quote this message in a reply
Jul 26, 2011, 07:32
Post: #3
RE: How to change the color for a logo that has pixels with varying degrees of opacity?
The suggestion above won't work too well, because it won't create a selection progressive enough. The best solution is to separate/extract the logo from its background, and paint it over:
  • Start the Layers dialog because a few things happens there: Ctrl-L
  • Make sure the logo layer has an alpha channel: Layer/Transparency/Add alpha channel (if it's grayed it's already there)
  • Colors/Color to alpha: the background become fully transparent (checkerboard), but the logo also become partially transparent (checkerboard partly visible through)
  • Layer/Mask/Add layer mask, initialize with "Transfer layer alpha channel". At that point, the operations we will perform are applied on the layer mask (transparency control) and not on the layer itself, but what you see in the image is the result. In the Layers dialog, you will see the layer mask next to the layer icon, it looks like a gray logo on black background.
  • Start the Levels tool. In the histogram, you will have a spike around value 195. You will have a better view if you set the histogram to "logarithmic" (icons on top right).
  • Grab the rightmost handle at the bottom of the histogram and drag it to the left. The green becomes more opaque and become fully opaque when you are just after the spike (around 194). If you go too far on the left, the voids in the logo start to fill again. So move to the best position (around 180 for me, there is a notch in the histogram), and press OK. Notice that the layer mask in the Layers dialog is now white on black .
  • Make that final with "Layer/Mask/apply layer mask" (layer mask disappears from Layers dialog).
We now have a green logo properly extracted. To change the color:
  • In the Layers dialog click in the "lock" checkbox at the top. This makes the transparency of each pixel unmodifiable.
  • Select a foreground color, and bucket-fill the layer.
You now have a logo on a transparent background and you can save it that way in a format that supports partial transparency (PNG). This is how it is the most useful, as it will automatically pick up the actual background when you use it (web page....). You can also save it as XCF which is the best way to save Gimp work.
If you want to add a non-transparent background, then
  • add a layer to the image,
  • move it below the logo layer,
  • bucket-fill that layer with the required color.
  • do not merge the layers.
  • save the image as XCF (this will preserve the layers, so you can rework them later). "Save as" in some usage format (PNG/JPG) will automatically merge the visible layers for you.

[attachment=569]

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Jul 29, 2011, 12:54
Post: #4
RE: How to change the color for a logo that has pixels with varying degrees of opacity?
Ofnuts;

Thanks for responding to my question. There is lots of good information there.

I have went through the process that you have described. I am down to the point where it says "Select a foreground color, and bucket-fill the layer."

I can't get it to bucket fill the entire image with one click. I am having to click each pixel or grouping of pixels in order to get them to bucket fill.

Here's what I have got so far.
   
Find all posts by this user
Quote this message in a reply
Jul 29, 2011, 13:26 (This post was last modified: Jul 29, 2011 13:28 by ofnuts.)
Post: #5
RE: How to change the color for a logo that has pixels with varying degrees of opacity?
1) make sure you have no selection ("Select/None") or complete selection ("Select/All") (either will work)
2) make sure the bucket-fill tool is set to "Fill whole selection" (and not "Fill similar colors")

If you are set correctly, the painting will happen in one click, done anywhere in the layer (logo or background)

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Jul 29, 2011, 14:18
Post: #6
RE: How to change the color for a logo that has pixels with varying degrees of opacity?
Wow! Neat. Thank you for the help.

I had to set the bucket fill tool to "Fill whole selection."

   

   

Thanks again for the help.
Find all posts by this user
Quote this message in a reply
Feb 21, 2012, 16:11 (This post was last modified: Feb 21, 2012 16:19 by JimTrail.)
Post: #7
RE: How to change the color for a logo that has pixels with varying degrees of opacity?
Ofnuts;

I am still having trouble getting the image to look clear and crisp (like the one you did).

I have got another customer that has a logo that they want me to put on a business cards. I scanned the image. Then I went through the steps you described.

The re-worked image looks better than the scanned one - but it is still not clear and crisp like the logo you worked on.

The colors green and blue vary. Some of the pixels are slightly lighter. All of the pixels are not uniform.

Do you have any more suggestions about how I might sharpen up the image?

Thanks.

Image with steps applied to it.
   

Original scanned image.
   
Find all posts by this user
Quote this message in a reply
Feb 21, 2012, 17:27
Post: #8
RE: How to change the color for a logo that has pixels with varying degrees of opacity?
im sorry i dont have time to do it but it looks like a simple one to re trace, i did the sky and the top of the mountains in like 10 mins. good luck.

[Image: MMSSig-2.png]
Find all posts by this user
Quote this message in a reply
Feb 21, 2012, 17:38
Post: #9
RE: How to change the color for a logo that has pixels with varying degrees of opacity?
(Feb 21, 2012 16:11)JimTrail Wrote:  Ofnuts;

I am still having trouble getting the image to look clear and crisp (like the one you did).

I have got another customer that has a logo that they want me to put on a business cards. I scanned the image. Then I went through the steps you described.

The re-worked image looks better than the scanned one - but it is still not clear and crisp like the logo you worked on.

The colors green and blue vary. Some of the pixels are slightly lighter. All of the pixels are not uniform.

Do you have any more suggestions about how I might sharpen up the image?

Thanks.

Image with steps applied to it.


Original scanned image.
I agree with MMS... time to learn to use the Path editor tool and use it to retrace the whole picture. The sky is a 9-summits polygon, done in 12 seconds tops, the mountains will take about two minutes to get right. Then you can resize the image to whatever and fill the path afterwards and it will remain very sharp.

Nothing prevents you from charging an eye for <cough>image restoration</cough> Smile

Of course this also means that it's only vector graphics and should better be done with InkScape.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Feb 21, 2012, 18:28
Post: #10
RE: How to change the color for a logo that has pixels with varying degrees of opacity?
everyone and inkscape lately, i gottah get on this i guess. Smile

[Image: MMSSig-2.png]
Find all posts by this user
Quote this message in a reply
Feb 22, 2012, 01:50
Post: #11
RE: How to change the color for a logo that has pixels with varying degrees of opacity?
This said, even with Gimp, a quick hack:

[attachment=969]

I'd recommend you straighten up the logo, which is a bit tilted on the left, before doing the path.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Feb 22, 2012, 03:01
Post: #12
RE: How to change the color for a logo that has pixels with varying degrees of opacity?
(Feb 22, 2012 01:50)ofnuts Wrote:  This said, even with Gimp, a quick hack:



I'd recommend you straighten up the logo, which is a bit tilted on the left, before doing the path.

Ofnuts;

Thank you so much. That looks great!

JT Smile
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Replacing color value w brush David JD 1 276 Aug 15, 2017 19:51
Last Post: ofnuts
  Gimp Tutorial: Add Logo to an Image MikeDaviesDMD 4 1,068 Sep 16, 2014 13:02
Last Post: rich2005
  Correcting color in AGED documents aljones 7 1,624 Jun 16, 2014 22:04
Last Post: ofnuts
  Make Android Logo Maannuell 2 918 Jun 26, 2013 20:10
Last Post: Maannuell
  How To Create a Microsoft Style Logo in Gimp Maannuell 1 1,618 Jun 8, 2013 16:24
Last Post: Neiiley

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS