Function to recolor and change alpha levels of a PhyloPic image.
recolor_phylopic(
img,
alpha = 1,
color = NULL,
fill = NULL,
remove_background = TRUE
)A Picture or png array object (matching
the type of img)
A Picture or png array object, e.g.,
from using get_phylopic().
numeric. A value between 0 and 1, specifying the opacity
of the silhouette.
character. Color to make the outline of the silhouette.
If NULL, the outline color is not changed.
character. Color to make the body of the silhouette. If
NULL, the body color is not changed.
logical. Should any white background be
removed? Only useful if img is a Picture
object. See details.
Some PhyloPic silhouettes do not have a transparent background.
Consequently, when color is used with vectorized versions of these images,
the entire image--including the background--is recolored. Setting
remove_background to TRUE (the default) will remove any white parts of
the image (which should only be the background).
Other transformations:
flip_phylopic(),
rotate_phylopic()