Gimp-Forum.net
How to change color of borders? - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: How to change color of borders? (/Thread-How-to-change-color-of-borders)

Pages: 1 2


How to change color of borders? - magnuslar - 02-06-2019

Hi!

I have an image of a logo where I need to change the color to blue - but there is a residue of red along the borders of the letters in the logo. See attached file. How can I eliminate this? I see how I can "select by color" and change the filling color, but the lines around - how can I select and change them?

Magnus


RE: HOw to change color of borders? - rich2005 - 02-06-2019

First thing, turn off the selection Select -> None

Then using Gimp 2.8 and reference to screenshots https://i.imgur.com/mUpKIHA.jpg

1. Enable the alpha lock top of the layers dialogue
2. Colors -> Color to Alpha using the default white.
3. With Foreground Color = Blue: click and drag the swatch into the canvas.
4. Reverse procedure, disable alpha lock top of layers dialogue
5. With Background color = White: Layer -> Transparency -> Remove Alpha channel


RE: HOw to change color of borders? - Ritergeek - 02-06-2019

Since the option rich2005 suggests does not appear to be available in 2.10, try inverting the selection (Ctrl+i) and delete the white background. The red will go with it. However, that leaves a rather jagged edge. As I look at the original image, I see the selection accurately reflects the current state of the edge. Copying the blue as selected and pasting into a new layer gives the same jagged result.

Here's how to get a smooth, crisp result without backing down to GIMP 2.8:
1) Open the Paths list and convert your existing selection to a path.
2) Convert that path back to a selection.
3) Create a new layer to ensure a clean result
4) Fill the new layer with blue or whatever color.


RE: HOw to change color of borders? - Ofnuts - 02-06-2019

(02-06-2019, 03:24 PM)Ritergeek Wrote: Since the option rich2005 suggests does not appear to be available in 2.10, try inverting the selection (Ctrl+i) and delete the white background. The red will go with it. However, that leaves a rather jagged edge. As I look at the original image, I see the selection accurately reflects the current state of the edge. Copying the blue as selected and pasting into a new layer gives the same jagged result.

Here's how to get a smooth, crisp result without backing down to GIMP 2.8:
1) Open the Paths list and convert your existing selection to a path.
2) Convert that path back to a selection.
3) Create a new layer to ensure a clean result
4) Fill the new layer with blue or whatever color.

Color>Color to alpha or the alpha-lock are still there in 2.10. You can also replace C2A with painting in Color erase mode.


RE: HOw to change color of borders? - magnuslar - 02-06-2019

Hi!

Thanks, guys! It worked.

However, on Ubuntu, I don't have that left side side panel, with all the selction tools and paint tools etc. I can open various dockable windows, and arrange them, but not that "default" panel. How can I enable that?

As for now, I had to find the correct panels/windows almost by trial and error..

Magnus


RE: HOw to change color of borders? - rich2005 - 02-06-2019

The screenshots are (k)ubuntu 16.04 Gimp 2.8.22

If you have multiple windows open in various location on the monitor.

1. Edit -> Preferences -> Windows Management then click on Reset Saved Window Positions to Default Values OK that and close Gimp

2. Restart Gimp gives the three separate windows Tools on the left - Image window - Docks on the right

3. Do not move these, location does matter with Gimp.

4. Use Windows -> Single Window Mode to do what it says.

Now size that up to suit your monitor.


RE: HOw to change color of borders? - magnuslar - 02-06-2019

Great, thanks!!

Magnus


RE: HOw to change color of borders? - Ritergeek - 02-07-2019

Thanks for the tip about adding the Alpha channel first. I had finally figured this out, and then your steps worked. I can't see any difference in curve smoothness between using alpha vs. path conversion, but somehow with the alpha conversion, the blue became somewhat transparent.

Now, as I try to understand that blue transparency white quit disappearing. Nothing at all changed. Then I used the dropper to selecting blue as the Color. That wiped out all white and left the blue about 50% transparent. Who knows?

I notice a GIMP error message: Corrupt 'gimp-metadata' parasite discovered.
XMP data could not be migrated: Parsing XMP data failed.

Maybe this has something to do with it. Will research that later.


RE: HOw to change color of borders? - rich2005 - 02-07-2019

(02-07-2019, 12:18 AM)Ritergeek Wrote: Now, as I try to understand that blue transparency white quit disappearing. Nothing at all changed. Then I used the dropper to selecting blue as the Color. That wiped out all white and left the blue about 50% transparent. Who knows?

There are elements in the blue that are removed - all the red for example, gives 80% transparency according to the color picker. If the OP was using Gimp 2.10 then the additional control opacity threshold, can adjust that but take care not to wreck the edge anti-aliasing.

Quote:I notice a GIMP error message: Corrupt 'gimp-metadata' parasite discovered.
XMP data could not be migrated: Parsing XMP data failed.

Maybe this has something to do with it. Will research that later.

Not the alpha setting. I would not worry about it too much, Gimp 2.8 handled exporting metadata poorly. Gimp 2.10 is a little better but can not read that particular info from the older format. This a comparison 2.8/2.10 there is no XMP/IPTC data in Gimp 2.10

[attachment=2604]

As you might guess, the original logo (from Illustrator) will be a vector. Much easier to change colours with a vector image
Always a good idea to strip Metadata when posting public on the internet. Wink


RE: How to change color of borders? - Ritergeek - 02-07-2019

Thanks for bearing with me here. I'm happy for now to stick with the selection to path process. Nice to have alternatives! And thanks for the reassurance about the parasite!