I Dare You!

by peter_budo

submit your photo

Hall of Fame
View past winners from this year

Please participate in Meta
and help us grow.

Take the 2-minute tour ×
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It's 100% free, no registration required.

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.

share|improve this question
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. –  Joel Glovier Sep 8 '11 at 12:56
I don't think this is a photography question... –  John Cavan Sep 8 '11 at 13:52
@John Cavan: Perhaps...but photography-related? This definitely seems to be the most popular of the SE sites for Photoshop questions. –  Unsigned Sep 8 '11 at 22:20
@Unsigned Code Labs - There's a Stack site in Beta that I think is better suited to this: graphicdesign.stackexchange.com –  John Cavan Sep 8 '11 at 23:55
@John Cavan: Ah, I hadn't seen that one. Haven't really looked at the Beta sites. –  Unsigned Sep 9 '11 at 1:50

4 Answers 4

up vote 7 down vote accepted

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

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer
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 '14 at 19:16

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.