add_trans | R Documentation |
Add transparency to a color
add_trans(color, trans)
color |
input color |
trans |
degree of transparency - a numeric values between 0 and 255 where 255 is fully visible) |
This function adds transparency to a color. It is originally by Tim Essington. Define transparency with an integer between 0 and 255, 0 being fully transparent and 255 being fully visible. Works with either color and trans a vector of equal length, or one of the two of length 1.
a hex code for the transparent version of color
x <- add_trans("red", 100) print(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.