image_transparent_inverse {plothelper}R Documentation

Keep Certain Colors Unchanged and Make Others Transparent

Description

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.

Usage

image_transparent_inverse(x, color, fuzz = 0)

Arguments

x

a magick image.

color

one or more colors you want want to keep unchanged.

fuzz

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.


[Package plothelper version 0.1.9 Index]