Skip to main content
deleted 212 characters in body
Source Link
Szabolcs
  • 236.5k
  • 31
  • 641
  • 1.3k

Perhaps something like this:

ColorConvert[
 PixelValue[im, pos],
 OptionValue[Options[im], ColorSpace] -> ImageColorSpace[im]
]

where im is an image and pos is a pixel position, e.g., {100, 150}.

The basic idea is to use ColorConvert to automatically get the correct head for the image's colour space (e.g. RGBColor or CMYKColor). For this, we need the syntax ColorConvert[list, colspace1 -> colspace2] where colspace1 should define the interpretation of the values in the list.

At this point, it is not entirely clear to me how to correctly handle images that have embedded ColorProfileData. I asked a new question for this here:

Perhaps something like this:

ColorConvert[
 PixelValue[im, pos],
 OptionValue[Options[im], ColorSpace] -> ImageColorSpace[im]
]

where im is an image and pos is a pixel position, e.g., {100, 150}.

The basic idea is to use ColorConvert to automatically get the correct head for the image's colour space (e.g. RGBColor or CMYKColor). For this, we need the syntax ColorConvert[list, colspace1 -> colspace2] where colspace1 should define the interpretation of the values in the list.

At this point, it is not entirely clear to me how to correctly handle images that have embedded ColorProfileData. I asked a new question for this here:

Perhaps something like this:

ColorConvert[
 PixelValue[im, pos],
 OptionValue[Options[im], ColorSpace] -> ImageColorSpace[im]
]

where im is an image and pos is a pixel position, e.g., {100, 150}.

The basic idea is to use ColorConvert to automatically get the correct head for the image's colour space (e.g. RGBColor or CMYKColor). For this, we need the syntax ColorConvert[list, colspace1 -> colspace2] where colspace1 should define the interpretation of the values in the list.

added 510 characters in body
Source Link
Szabolcs
  • 236.5k
  • 31
  • 641
  • 1.3k

Perhaps something like this:

ColorConvert[
 PixelValue[im, pos],
 OptionValue[Options[im], ColorSpace] -> ImageColorSpace[im]
]

where im is an image and pos is a pixel position, e.g., {100, 150}.

The basic idea is to use ColorConvert to automatically get the correct head for the image's colour space (e.g. RGBColor or CMYKColor). For this, we need the syntax ColorConvert[list, colspace1 -> colspace2] where colspace1 should define the interpretation of the values in the list.

At this point, it is not entirely clear to me how to correctly handle images that have embedded ColorProfileData. I asked a new question for this here:

Perhaps something like this:

ColorConvert[
 PixelValue[im, pos],
 OptionValue[Options[im], ColorSpace] -> ImageColorSpace[im]
]

where im is an image and pos is a pixel position, e.g., {100, 150}.

Perhaps something like this:

ColorConvert[
 PixelValue[im, pos],
 OptionValue[Options[im], ColorSpace] -> ImageColorSpace[im]
]

where im is an image and pos is a pixel position, e.g., {100, 150}.

The basic idea is to use ColorConvert to automatically get the correct head for the image's colour space (e.g. RGBColor or CMYKColor). For this, we need the syntax ColorConvert[list, colspace1 -> colspace2] where colspace1 should define the interpretation of the values in the list.

At this point, it is not entirely clear to me how to correctly handle images that have embedded ColorProfileData. I asked a new question for this here:

Source Link
Szabolcs
  • 236.5k
  • 31
  • 641
  • 1.3k

Perhaps something like this:

ColorConvert[
 PixelValue[im, pos],
 OptionValue[Options[im], ColorSpace] -> ImageColorSpace[im]
]

where im is an image and pos is a pixel position, e.g., {100, 150}.