This function is an inverse version of
magick::image_transparent
.
While the latter makes certain colors
transparent, the former keeps them
unchanged and make others transparent.
image_transparent_inverse(x, color, fuzz = 0)
a magick image.
one or more colors you want want to keep unchanged.
color tolerance between 0 and 100.
Its length must be 1 or the same as color
(which
means you can have different fuzz values for
different colors).
Suppose your color is white. If fuzz=0, then only
white will be kept unchanged; if fuzz=10, colors
similar to white will also kept unchanged.