WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

ColorDetect [image,cspec]

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

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Applications  
See Also
Related Guides
History
Cite this Page

ColorDetect [image,cspec]

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

Details

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

Examples

open all close 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:

Wolfram Research (2019), ColorDetect, Wolfram Language function, https://reference.wolfram.com/language/ref/ColorDetect.html.

Text

Wolfram Research (2019), ColorDetect, Wolfram Language function, https://reference.wolfram.com/language/ref/ColorDetect.html.

CMS

Wolfram Language. 2019. "ColorDetect." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ColorDetect.html.

APA

Wolfram Language. (2019). ColorDetect. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ColorDetect.html

BibTeX

@misc{reference.wolfram_2025_colordetect, author="Wolfram Research", title="{ColorDetect}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/ColorDetect.html}", note=[Accessed: 17-November-2025]}

BibLaTeX

@online{reference.wolfram_2025_colordetect, organization={Wolfram Research}, title={ColorDetect}, year={2019}, url={https://reference.wolfram.com/language/ref/ColorDetect.html}, note=[Accessed: 17-November-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /