WLJS LogoWLJS Notebook

ImageRecolor

ImageRecolor[image, region -> color] recolors pixels in image specified by region using the specified color.

  • ImageRecolor[image, {region1 -> color1, ...}] recolors multiple regions.
  • ImageRecolor[video, ...] recolors frames of a video.

This function changes the color of selected regions in images or videos.

Examples

img = ExampleData[{"TestImage", "Lena"}];
ImageRecolor[img, Rectangle[{0, 0}, {100, 100}] -> Red]
ImageRecolor[img, Disk[{128, 128}, 50] -> Blue]
ImageRecolor[img, {Disk[{50, 50}, 30] -> Green, Disk[{200, 200}, 30] -> Yellow}]

*See the official Wolfram Language Reference for more details.

On this page