Is there any way to select all pixels on the current layer that match a specific color value exactly?

My first instinct is Select > Color Range..., but I cannot determine how to input a specific pixel color by value, without knowing ahead of time the location of a pixel of that color. The goal being to select pixels that match that specific color, or none if no pixels have that color.

  • FYI - if you're used to Illustrator's "Select Same Fill Color" or "Select Same Stroke Color" function - there's not an exact comparison in Photoshop because of raster graphics app vs vector graphics app. Sep 8, 2011 at 12:56
  • 1
    I don't think this is a photography question...
    – Joanne C
    Sep 8, 2011 at 13:52
  • @Unsigned Code Labs - There's a Stack site in Beta that I think is better suited to this: graphicdesign.stackexchange.com
    – Joanne C
    Sep 8, 2011 at 23:55

5 Answers 5


You can use the Magic Wand Tool with the following setting:

Tolerance: 0
Anti-alias: unchecked
Contiguous: unchecked
Sample All Layers: *checked or unchecked* (See below)

The Magic Wand Tool also uses the "Sample Size" settings from the Eye Dropper tool, so you will have to switch to that tool and make sure it is set to "Point Sample" before using the Magic Wand Tool. Otherwise you could end up selecting more colors than you intended.

To select a color by value, the easist way is probably to make a new layer and fill some part of it with the color you wish to select, and then use the Magic Wand tool (set to sample all layers) and click on your color patch on the new layer.

Source: http://ask.metafilter.com/146706/This-Photoshop-is-driving-me-crazy#2104497


IMHO Select > Color Range is the way to go (fast and, I dare say, most semantically correct).

While you are in the aforementioned window, click your eyedropper tool on the little squares (foreground color and background color) in the COLOR panel (usually top right) to sample a color you previously determined in HSB, RGB, LAB or CMYK mode (or simply picked from the palette).

edit - I was about to forget: in Select > Color Range uncheck localized color clusters and set fuzziness to 0 (although you probably figured it out) to select exactly that color over your whole image.

  • <3 Just wow, <3 wowowowow
    – agrublev
    Feb 16, 2019 at 10:09

If you know the color beforehand, it's pretty simple. Create a new layer and fill with the desired color. Change the blending mode to "difference". Now you can create a mask from the composite, invert so the desired color is white in the mask and use curves to make everything else black.

If you use another method from one of the other answers, you can still use the difference mode to check that no undesired colors were included. Just add a curves adjustment layer to exaggerate any differences.


If you are asking to the equivalent to Illustrators "select same" function - you can use the Magic Wand tool in Photoshop, click on the color you're trying to get a hold of and then goto Select > Similar and the magic wand selection will now cover everything that matches your selected color.

  • Almost. You need to adjust the tolerance down to "0" or you'll get "similar" colors, not the exact color only. See the accepted answer above. I believe the tolerance setting applies to some other selection tools.
    – MikeW
    Jul 27, 2014 at 19:16

When using the magic wand tool, set the Tolerance to 0, turn off both anti alias and contiguous and then turn sample all layers on. This will select only one colour across the whole image.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy