# How to find a specific color in one picture?

In a picture, there are many different colors. How can I just want to find the position of one color. In the following picture, if I would like to find the coordinates of the position of blue, how can I achieve that? Thank you very much!

-
By Blue you mean RGBColor[0,0,1]? Is PixelValuePositions ok? –  Kuba Oct 31 '13 at 7:17
@Kuba I think that is a good answer. image = Import["1wEvU.jpg"]; PixelValuePositions[image, Blue, 0.4] gave me {{1605, 810}, {1606, 810}, {1604, 809}, {1605, 809}, ... –  Nasser Oct 31 '13 at 7:22

image = Import["http://i.stack.imgur.com/1wEvU.jpg"];


Look for anything within 0.3 of Blue:

pv = PixelValuePositions[image, Blue, .3]

{{1614, 784}}


Just one pixel is that close to pure Blue. To display it:

HighlightImage[image, pv, "HighlightColor" -> White,
Method -> {"DiskMarkers", 20}]


It's over by the Balloon(?).

-
Ooh, I've never come across HighlightImage before. +1, but why is it community wiki? –  Simon Woods Oct 31 '13 at 10:35
@SimonWoods :) Too long to be yet another comment-as-answer, but didn't want to snatch credit away from commenters... –  cormullion Oct 31 '13 at 10:37
@cormullion Can PixelValuePositions be used to find some "strange" color? –  KathyLL Oct 31 '13 at 21:35
@kathyLL any color will work, if you know its RGB values. But strangeness needs defining! :) –  cormullion Oct 31 '13 at 21:51
@cormullion Thanks a lot! –  KathyLL Nov 1 '13 at 18:21