get_colours | R Documentation |
Retrieve colour hex values from a palette
get_colours(
colour_names = "red",
palette = r2dii.colours::palette_1in1000_plot
)
colour_names |
Character string or a vector of character strings with names of colours for which you want to retrieve the hex values. |
palette |
The dataframe from which the hex values are retrieved. It
should contain columns |
A vector of strings with hex codes in order specified by
colour_names
.
# use default palette
get_colours(c("red", "blue"))
# specify which palette to use
get_colours(c("red", "green"), palette = palette_1in1000_goodbad)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.