Description Usage Arguments Examples
View source: R/color_preview.R
Show a plot of colors. Code adapted from Karthik Ram's wesandersonr package (https://github.com/karthik/wesanderson/blob/master/R/colors.R).
1 | color_preview(x, name = NULL, ...)
|
x |
character vector of colors in hex format |
name |
string of name to print in the palette; if not given, the function looks for a name attribute in the object |
... |
does nothing for now |
1 2 3 4 5 6 7 8 9 10 | ## Not run:
color_preview(c("#0074D9", "#2ECC40", "#FFDC00", "#FF4136"))
color_preview(c("#0074D9", "#2ECC40", "#FFDC00", "#FF4136"),
name = "Some colors")
color_preview(viridisLite::viridis(6, begin = 0.15, end = 0.85,
option = "inferno"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.