get_palette | R Documentation |
Access a named palette from a named collection. Supports discrete or continuous palettes.
get_palette(collection, palette, n = NULL, type = c("discrete", "continuous"))
collection |
Character name of the collection (e.g., "sb", "ohsu", "personal") |
palette |
Character name of the palette within the collection (e.g., "deep", "muted") |
n |
Number of colors to return. If NULL, returns all available colors. |
type |
One of "discrete" or "continuous". |
A character vector of hex color codes.
get_palette("sb", "deep")
get_palette("sb", "muted6", n = 3)
get_palette("sb", "deep", n = 100, type = "continuous")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.