Create a Color Palette. This function generates a custom color palette based on the specified 'palette' name. The color palettes are sourced from two predefined lists: 'taylor_palettes' and 'radiohead_palettes'.

colPalette(palette)

Arguments

palette

A character string specifying the name of the colour palette. The palette must be present in either 'taylor_palettes' or 'radiohead_palettes'.

Value

A colorRampPalette function with the specified colour palette.

Examples

my_palette <- colPalette(palette = "evermore")
colours <- my_palette(5)
print(colors)
#> function (distinct = FALSE) 
#> {
#>     c <- .Call(C_colors)
#>     if (distinct) 
#>         c[!duplicated(t(col2rgb(c)))]
#>     else c
#> }
#> <bytecode: 0x127454038>
#> <environment: namespace:grDevices>