| get_cols | R Documentation |
Retrieves color palettes from the IOBR package with options for randomization and visualization. Users can specify predefined palettes or provide custom colors.
get_cols(cols = "normal", palette = 1, show_col = TRUE, seed = 123)
cols |
Character vector of colors, or one of: - '"normal"': Use standard palette - '"random"': Randomly shuffle the palette Default is '"normal"'. |
palette |
Numeric or character specifying the palette. Options are 1, 2, 3, 4, or palette name. Default is 1. |
show_col |
Logical indicating whether to display the color palette. Default is 'TRUE'. |
seed |
Integer seed for random number generator when 'cols = "random"'. Default is 123. |
Character vector of colors.
# Get default palette
mycols <- get_cols()
# Get random palette
mycols <- get_cols(cols = "random", seed = 456)
# Use custom colors
mycols <- get_cols(cols = c("red", "blue", "green"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.