This seems like a basic feature, but I'm missing it somehow. I have the the outline of a state with a discrete colorful border.


I'd like to select the border AND the inner contents so I can produce something like this (sloppily done here with the Lasso)

Final Product

I've tried selecting the entire border using the fuzzy select (magic wand) or select by color but this only gives me the border itself.

Border Select

In the Selection menu, I can invert the selection, but that grabs everything.

Inverted Border

How can I select all the contents inside a selected region?

  • Given the simple shape, you can reproduce it very easily in a few clicks (15 or so) using the freehand selector in "polygon" mode or the Path tool.
    – xenoid
    Aug 25, 2016 at 13:10

5 Answers 5


This is a job for the quick mask feature. I allows you to paint on the selection itself as if it were the image -

So, after selecting the border itself with the magic wand as you did above, click on the small "hidden" button to the left of the horizontal scroll bar. That shows a red tinted translucent representation of your selection itself, and all painting you do will affect it - it is a grayscale drawable, so full white (255) means "fully selected" and black (0) means "unselected" (although the representation on this view is inverted: selected areas are shown as transparent, unselected as opaque). Then, just use the bucket-fill tool to fill u the outside (or inside) of your selection with "White" (Which will render the trnaslucent tint transparent), revert back to normal editing by clicking on the quickmask again - and you are done.

It certainly does take much fewer steps than Kylemit's answer.


Here's a simple way to let the fuzzy select drive the entire process.

TLDR: grab the border and invert the selection, then fill the outside and paste over the original image.

Steps By Step:

  1. Original
    enter image description here
  2. Fuzzy Select Border
    enter image description here
  3. Select > Invert + Cut
    enter image description here
  4. Bucket Fill Tool Outside
    enter image description here
  5. Select All + Copy
    enter image description here
  6. Undo until Original Image + Paste
    enter image description here
  7. Layer > Anchor Layer
    enter image description here
  8. Fuzzy Select Outside + Cut
    enter image description here
  • 1
    That is nice - but it is much easier just to use the quickmask with bucket fill.
    – jsbueno
    Aug 25, 2016 at 8:22

Assuming that you don't have the border on a separate layer:

  1. Use the fuzzy select (magic wand tool) to select the interior. Click and hold on any white/grey point inside, then drag until most of the inside is selected.

You won't have the thin text selected but that's okay.  You can change the "Select by" mode to "Saturation" if you really want to be thorough (the red is super saturated so it won't get selected).

  1. Use Select>Grow set to 4px or so. This will partially select the red border and also consume the small unselected areas in the middle.

  2. With the magic wand still active, shift+click on the red border.

Hope that helps!


You can utilize multiple selection tools for a single selection. Try color selecting the stroke with the Magic Wand (adjust the tolerance at the top to refine the selection) then using any of the other selection tools like the Rectangle Marquee tool for example, hold shift and select the area within.

Holding Shift (while dragging a selection) with a selection tool adds the new selection to the current selection. Holding Alt subtracts from the current selection.


On selecting the red line we will end up with an outer and an inner selection of the area enclosed.

This big "hole" can be removed using an external script Remove Holes (from Selection) designed to just do that.

Also see How can I select the convex hull of an existing selection? for an example.

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.