R/add_alpha.R
add_alpha.Rd
This function converts a named color to RGB and adds an alpha (relative transparency) value.
add_alpha(col, alpha)
A character string specifying the named color
A numeric value specifying the transparency (0 for fully transparent)
The output of a rgb call.
rgb
transparent_red <- add_alpha("red", 0.3)