col2hex | R Documentation |
The function takes the color names as specified in colors() together with alpha levels and transforms it to hex representation. Optionally it can also name the returned vector by names provided by the user.
col2hex(cols, alpha=1, names=NA)
cols |
character vector |
alpha |
numeric, ranged 0-1 |
names |
character vector, default NA |
numeric vector
Małgorzata Oleś <malgorzata.oles@embl.de>
col2hex(cols=c("hotpink","skyblue"), alpha=0.5)
col2hex(cols=c("hotpink","skyblue"), alpha=0.5, names = c("A","B"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.