returns a mask image representing regions in image with colors within the specified color region.


  • ColorDetect is typically used to specify an image mask including pixels within the color region.
  • Possible settings for the color specification cspec include:
  • colorcolors near color
    ColorsNear[color,d,]explicit specification of colors near color


open allclose all

Basic Examples  (1)

Use ColorDetect to compute an image region:

Use the region as an alpha channel:

Scope  (3)

Compute the pixels in the color region:

Specify a maximum color distance:

Specify a custom function to compute the distance:

Applications  (1)

Perform selective decolorization:

Introduced in 2019