vis_palette | R Documentation |
This function takes a list of color palettes and visualizes them using 'ggplot2'.
vis_palette(palette_list)
palette_list |
A (named) list of color palettes. Each element of the list should be a vector of color codes, optionally with names. |
The colour palettes inside the list can be named, as can be the individual colours. The names are then displayed in the swatch plot.
A 'ggplot' object visualizing the color palettes.
palettes <- list(
palette1 = c(moc = "#FF0000", trochu = "#00FF00", malo = "#0000FF"),
palette2 = c("#FFFF00", "#FF00FF", "#00FFFF")
)
vis_palette(palettes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.