1

In Gimp (2.8.10) when I use the Select by Color tool it frequently selects bits of color physically distant from the area I'm trying to select. For example I'm trying to select the color of a shirt on a person wearing shorts and it select parts of their legs as well as the shirt. Messing with the threshold helps but does not usually solve the problem.

Primarily my question is what techniques are there to select by color effectively? For example, is it possible to first select a general rough region with a lasso or other tool and then do a select by color only within that region?

2

Select by color is supposed to select all occurrences of the color beneath the cursor - and those within the threshold you have set in the tool options - inside the whole image.

You can achieve your goal via two ways, depending on the desired result:

1. Change of tools

If you plan to end up with one contiguous selected region, then your task is more suited for the fuzzy selection tool (aka magic wand aka contiguous region selection).

This does also take the color from beneath the cursor location as a starting point, but also starts selecting from that location into the surrounding area. You can imagine this as if the selection would grow outwards from that initial point into the connected regions of reasonably similar colors.

See http://docs.gimp.org/en/gimp-tool-fuzzy-select.html for details.

2. Change of tool modes

This works nice if you want to get multiple, disconnected selected regions areas of similar color, but only within a specific part of your image.

You'll change the selection mode - that is one of Replace (the default), Add, Subtract and Intersect for the selection tools, and their purpose is to make the selection you are creating to replace, add to, subtract from or intersect with an already existing selection. The mode setting is found in the selection tool options.

So, in order to achieve this:

  • create a selection with the Free Select tool in Replace mode
  • switch to the Select by Color tool and set its mode to Intersect
  • within the existing selection, use the tool to select a region with the colors you want; this may result in multiple selected regions

Note that the Intersect mode makes those only appear within the previously created selection, and nowhere else in the image.

| improve this answer | |
  • Ah yes that does seem better suited to my task thanks. Still curious however if it's possible to select a rough hand-drawn region first and then do a select by color only within that region? – User Feb 27 '15 at 22:22
  • You'd use the Free Select and Select by color tools and their selection modes to achieve that, they are available in the tool options. There is Replace, Add, Subtract and Intersect. In your case, the Free Select is done in Replace mode to get the rough outline. Then you change to the Select by Color tool and set its mode to Intersect. If used within the existing selection, you get the intersection of the selections as the final result. (let me wrap this into the actual answer) – Michael Schumacher Feb 28 '15 at 1:25

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.