add.alpha | R Documentation |
add.alpha
modifies a vector of named ('firebrick') or hexdecimal
('#B22222') color specifications to add an alpha (transparency) channel.
Inspired by https://gist.github.com/mages/5339689
add.alpha(col, alpha)
col: |
A string vector of colour names or hex colour strings. |
alpha: |
A number between 0 (solid) and 1 (fully transparent). |
A string vector of modified hex colour strings.
require(RColorBrewer)
pal <- add.alpha(brewer.pal(5, 'Set1'), 0.5)
plot(rnorm(100), rnorm(100), pch=21, col='black', bg=pal, cex=10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.