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

Examples

open allclose all

Basic Examples  (3)

Replace a background with transparency:

In[1]:=
Click for copyable input
Out[1]=

Replace black pixels in an image:

In[1]:=
Click for copyable input
Out[1]=

Replace red pixels in a 3D image:

In[1]:=
Click for copyable input
Out[1]=

Scope  (2)

Applications  (4)

Properties & Relations  (2)

See Also

Image  Replace  ReplaceAll  DominantColors

Introduced in 2012
(9.0)
| Updated in 2014
(10.0)