coloralpha | R Documentation |
add alpha to colours
coloralpha(x, alpha = 0.5)
x |
character, can be a character vector, contains either names of colors (e.g. "red", "darkgreen") or their hexadecimal representation |
alpha |
numeric between 0 and 1, sets transparency (0 = transparent, 1 = opaque) |
color names in hexadecimal
coloralpha(c("#FF0000", "#FFD700"), alpha = 0.3) coloralpha(c("red", "green"), alpha = 0.3) coloralpha("#FF0000", alpha = 0.3) coloralpha("red", alpha = 0.3) mycols <- c("#F1BB7B", "#FD6467", "#5B1A18", "#D67236") mycols <- coloralpha(mycols) plot(1:4, 1:4, pch=16, cex=10, col=mycols) points(1:4, 1:4+0.2, pch=16, cex=10, col=mycols)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.