Post Reply 

Colour Exchange?

Mar 9, 2012, 23:47
Post: #1
Colour Exchange?
Hi!

I am trying to exchange two colours. However when I used 'Colours -> Map -> Colour Exchange' and specify the 'from' and 'to' colours appropriately... the original colour does not change. e.g. I have a blue solid circle. I want to make it green (it is anti-aliased so can't use fill). The 'from' colour is set to blue (using the colour picker) and I specify a colour green. However the circle remains the original blue.

I have definitely selected the correct layer, however maybe this is the wrong tool to use? I have already looked a tutorials and the help and it doesn't seem to work for me. I'm using GIMP 2.6.11.

Any ideas how to achieve this? Thanks! Smile

p.s. If you're American then ignore the 'u' in Colour Wink
Find all posts by this user
Quote this message in a reply
Mar 10, 2012, 00:19
Post: #2
RE: Colour Exchange?
Colo(u)r(*) exchange by default replaces the exact color (ie, very same RGB triplet) and you won't find many pixels where RGB is the same. You can play with the thresholds but it quickly gets nasty because this is still the RGB model. A much better tool is Colors/Map/Rotate colors, where you map a range of source hues to a range of target hues, working in the HSV model.

(*) Being French allows me to be spelling-agnostic Smile

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
Mar 10, 2012, 01:02
Post: #3
RE: Colour Exchange?
Thanks ofnuts.

I couldn't get Rotate Colo(u)rs to work for what I require.

Let me explain in greater detail what I'm trying to do:
The main colour of the circle is #3db8b8 (with anti-aliased variations of this colour on the circle's edge obviously). I want to change the main colour of the circle to #008000, and still change the anti-aliasing correctly for that colour so it looks correct.

So far, Colour Exchange, Colour Rotate or Colours Hue-Saturation all fail to deliver this goal as far as I can see. Is there a way to get the specific colours I want?

Thanks in advance.
p.s. I love your spelling-agnosticism Smile
Find all posts by this user
Quote this message in a reply
Mar 10, 2012, 01:59
Post: #4
RE: Colour Exchange?
I worked it out. I used 'Colour Exchange' but had to set the Red, Green and Blue thresholds all to 1.000. The default setting of 0.000 failed to do anything useful.

The anti-aliased pixels also correctly change colours as required.

However thanks for introducing me to the Colour Rotate method, that looks good for photographs rather than for things like logos.
Find all posts by this user
Quote this message in a reply
Mar 10, 2012, 10:20
Post: #5
RE: Colour Exchange?
(Mar 10, 2012 01:02)xandrani Wrote:  Thanks ofnuts.

I couldn't get Rotate Colo(u)rs to work for what I require.

Let me explain in greater detail what I'm trying to do:
The main colour of the circle is #3db8b8 (with anti-aliased variations of this colour on the circle's edge obviously). I want to change the main colour of the circle to #008000, and still change the anti-aliasing correctly for that colour so it looks correct.

So far, Colour Exchange, Colour Rotate or Colours Hue-Saturation all fail to deliver this goal as far as I can see. Is there a way to get the specific colours I want?

Thanks in advance.
p.s. I love your spelling-agnosticism Smile
A method that works, but I don't know how easily it applies to your image:
- duplicate your layer
- in the top layer, extract the circle from its background using the technique expounded here: this will replace the mixed colors used for antialiasing but a constant color with varying transparency.
- in the original layer, paint over the circle with the background color
- lock the alpha channel for the circle layer ("lock" checkbox at top of Layers list).
- paint over with new color (you can actually bucket-fill the whole layer, or paint with a 500px brush... the alpha-lock will prevent spills).
- merge down

On the whole it is a lot easier to keep all things with different colors in different layers. Never draw/paint directly on the background, always add a layer when you want to add something.

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
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Fill with picked colour qim 6 308 Aug 30, 2014 07:13
Last Post: qim
  Help adding colour layer lemonsqueezer 1 154 Aug 29, 2014 05:35
Last Post: fluffybunny2
  background changes colour Weatherlawyer 8 554 Jul 19, 2014 00:26
Last Post: Weatherlawyer
  GIMP 2.8: Setting the colour of a layer davinci 3 268 May 30, 2014 07:25
Last Post: davinci
  How do I change the colour of black antialiased text? DaveR 7 626 May 9, 2014 23:21
Last Post: ofnuts

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS