Add transparency to a color
Usage
add_transparency(color, trans)
Arguments
- color
character hex color that you want to add transparency to
- trans
integer value between 0 and 255, with 0 being fully transparent and 255 being fully visible
Value
A character hex value for the transparent version of your color
Examples
color_in <- "#FF5555"
color_alpha <- add_transparency(color = color_in, trans = 255/2)
plot(1:3, rep(5,times = 3), col = color_alpha, pch = 19)
points(1:3, rep(3, times = 3),col = color_in, pch = 19)