ColorReplace
ColorReplace[image,color]
finds regions in image whose pixel values are similar to color and replaces them with transparent pixels.
ColorReplace[image,colorreplacement]
replaces all pixels with the specified replacement color.
ColorReplace[image,colorreplacement,d]
replaces all pixels whose values are within a distance d from color.
ColorReplace[image,{color1replacement1,…},{d1,…}]
does multiple color replacements.
Details
- ColorReplace works with arbitrary 2D and 3D images.
- ColorReplace[image,color] is equivalent to ColorReplace[image,color,0.1].
Examples
open allclose allScope (4)
Applications (4)
Properties & Relations (2)
Replacing pixels of a grayscale image with color values will result in a color image:
Use DominantColors to find the dominant green color to be replaced:
Text
Wolfram Research (2012), ColorReplace, Wolfram Language function, https://reference.wolfram.com/language/ref/ColorReplace.html (updated 2014).
CMS
Wolfram Language. 2012. "ColorReplace." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/ColorReplace.html.
APA
Wolfram Language. (2012). ColorReplace. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ColorReplace.html