This function aligns its signature with RColorBrewer::color.pal()

palette_rl(n = 7, name = "RL", type = c("qual", "seq", "div"))

Arguments

n

number of colors to use (1..5), default is to return all five

name

name of palette

type

nature of data, default "qual" for qualitative or "seq" for sequential or "div" for diverging

Value

named vector with colors and hex codes

Examples

palette_rl(1) # return the primary color
#> red #> "#EF3239"
library(scales) alpha(palette_rl(), 0.4) # return light signature colors (40 % alpha)
#> red gray lightgray blue cyan maroon #> "#EF323966" "#4D4D4D66" "#EFEFEF66" "#0098A766" "#AEE1E266" "#A2203566" #> yellow #> "#FEB44866"
show_col(alpha(palette_rl(), 0.8)) # return medium light 80% alpha palette