by ʇolɐǝz ǝɥʇ qoq

Submit your Photo
Hall of Fame

Please participate in Meta
and help us grow.

Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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: – 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
up vote 12 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.


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 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

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

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.

share|improve this answer
This only works if there is an existing pixel whose location is known, and is the exact color desired. The question asks how to find pixels of a given color, using only the RGB (or CMYK, or Lab) color values, without knowing if/where any pixels of that color currently exist. – Unsigned Apr 12 '15 at 6:32

put fuzziness to 1 and it'll only select that one color, worked for me...

share|improve this answer

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

Can you try to be clearer and elaborate? – Hugo Dec 10 '15 at 22:13

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.