FindMatchingColor [image,color]
returns a color similar to the color that is present in image.
FindMatchingColor [image,{color1,color2,…}]
returns a list of colors matching each colori.
FindMatchingColor [{image1,image2,…},{color1,color2,…}]
returns lists of matching colors for all imagei.
FindMatchingColor
FindMatchingColor [image,color]
returns a color similar to the color that is present in image.
FindMatchingColor [image,{color1,color2,…}]
returns a list of colors matching each colori.
FindMatchingColor [{image1,image2,…},{color1,color2,…}]
returns lists of matching colors for all imagei.
Details and Options
- FindMatchingColor takes the dominant colors of the image and returns a color it finds close to color. It is typically used for finding the shade of a color present in an image.
- If no color similar to color is available in image, a Missing object is returned.
- The following options can be given:
-
- FindMatchingColor [{col1,col2,…},color] is also supported.
Examples
open all close allBasic Examples (2)
Find a color similar to pink in the image:
The image does not have a color similar to green:
Find a color similar to pink from a list of colors:
Scope (4)
Find a color similar to pink in an image:
Look for multiple similarities:
Find a similar color in multiple images:
Find a similar color within an explicit color list:
Options (3)
ColorCoverage (1)
By default, an automatic minimum color coverage is used:
Require a minimum coverage level:
Specify a coverage interval:
DistanceFunction (1)
By default, a perceptual color distance is used:
Use DistanceFunction to specify a different distance metric:
The new match has a closer luminance to the reference:
MaxColorDistance (1)
By default, only colors close to the target color are returned:
Use MaxColorDistance to specify a custom threshold:
Use MaxColorDistance Infinity to find the closest color:
Applications (3)
Perform a foreground-background segmentation based on the color of the background:
The image seems to contain blue, but the actual pixel values are very far from it:
Find the matching blue in the image and use it to perform the segmentation:
Transform a color palette using colors from a natural image:
Select images based on the presence of a color:
Find images with yellow objects:
Find images with yellow and red objects:
Find images with red and green objects:
Related Guides
History
Text
Wolfram Research (2019), FindMatchingColor, Wolfram Language function, https://reference.wolfram.com/language/ref/FindMatchingColor.html.
CMS
Wolfram Language. 2019. "FindMatchingColor." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FindMatchingColor.html.
APA
Wolfram Language. (2019). FindMatchingColor. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindMatchingColor.html
BibTeX
@misc{reference.wolfram_2025_findmatchingcolor, author="Wolfram Research", title="{FindMatchingColor}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/FindMatchingColor.html}", note=[Accessed: 18-November-2025]}
BibLaTeX
@online{reference.wolfram_2025_findmatchingcolor, organization={Wolfram Research}, title={FindMatchingColor}, year={2019}, url={https://reference.wolfram.com/language/ref/FindMatchingColor.html}, note=[Accessed: 18-November-2025]}