PixelValue will extract the channel values at a certain pixel. It returns a vector of numbers, not a colour. Is there a simple way to extract the colour of a pixel as an expression that is
ColorQ? The image could have an arbitrary colour space.
Perhaps something like this:
ColorConvert[ PixelValue[im, pos], OptionValue[Options[im], ColorSpace] -> ImageColorSpace[im] ]
im is an image and
pos is a pixel position, e.g.,
The basic idea is to use
ColorConvert to automatically get the correct head for the image's colour space (e.g.
CMYKColor). For this, we need the syntax
ColorConvert[list, colspace1 -> colspace2] where
colspace1 should define the interpretation of the values in the list.