csscolor | R Documentation |
Generate CSS-compatible color strings
csscolor(x, format = c("auto", "hex", "rgb", "rgba"), use.names = TRUE)
x |
color input |
format |
the output format of color strings |
use.names |
logical of whether to preserve the names of input |
a character vector of CSS-compatible color strings
csscolor(rgb(0, 0.5, 0.5))
csscolor(c(rgb(0, 0.2, 0.2), rgb(0, 0.5, 0.2)))
csscolor(rgb(0, 0.5, 0.5, 0.2))
csscolor(gradient(c(1,2,3,4,5), "white", "red"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.