powered by
Load a named palette from data/palettes.rds, returning a vector of HEX colors. Automatically checks for type mismatch and provides smart suggestions.
get_palette( name, type = c("sequential", "diverging", "qualitative"), n = NULL, palette_rds = system.file("extdata", "palettes.rds", package = "evanverse") )
Character vector of HEX color codes.
Character. Name of the palette (e.g. "vividset").
Character. One of "sequential", "diverging", "qualitative".
Integer. Number of colors to return. If NULL, returns all colors. Default is NULL.
Character. Path to RDS file. Default uses system file in package.
get_palette("vividset", type = "qualitative") get_palette("softtrio", type = "qualitative", n = 2) get_palette("blues", type = "sequential", n = 3) get_palette("contrast_duo", type = "diverging")
Run the code above in your browser using DataLab