Copy link to clipboard
Copied
Howdy Folks,
Does anyone know if it is possible to select all instances of one color where it touches another color? I don't really know how to explain with words so that's where my images of a simplified example come in:
In this case I want to select all the green that is touching white while leaving all of the green that isn't alone so I can delete the selected ones.
So far I have been using the magic wand tool on contiguous and selecting them one at a time which is inconvienient because my actual use case has over 50 selections I have to select and then delete. The inverse, using whe magic wand tool without contiguous, is even worse because there are 100s of internal patches I have to then deselect. Is there a way to select all the green touching white all at once without selecting all the green?
As always so greatful for any help anyone can offer!
I figured out a way to do it! not the most sophisticated answer but it works so I thought I'd follow up. Fill the background with the green and then reselect it with the magic wand, contiguous on, and delete.
Copy link to clipboard
Copied
I would recommend using Select > Color Range... to select all the green spots to make the initial selection. It will include all the green spots. Then use the Lasso in Subtract from selection in the Options bar or while holding the Option (macOS) / Alt (Windows) modifier key to temporily invoke subtracting from the selection and draw around the selected green spots in the middle that you don't want to remove. Then delete or make a layer mask from the selection to hide the ones that are selected on the edges.
Copy link to clipboard
Copied
Hi Myra, I find that the magic wand tool with contiguous off consistently selects all the green for me and is less steps than the Select>Color Range Method. This advice of mass deselecting the middle green spots works for the example image but for my use case it's not so easy to do.
In this case I would be deleting all the Black that touches Blue and it wouldn't work so well. I was mostly wondering if there was a way to select them in one go, willing to even look into scripting something if that would be possible.
Copy link to clipboard
Copied
I figured out a way to do it! not the most sophisticated answer but it works so I thought I'd follow up. Fill the background with the green and then reselect it with the magic wand, contiguous on, and delete.