I have a famous nine-color universe that I would like to use to create custom color palettes with a function.
col_universe <- list(dark_blue = "#034772", med_blue = "#2888BC",
light_blue = "#73B7CE", green = "#699D46", orange = "#EA8936", gold = "#F9C347",
dark_grey = "#58595B", medium_grey = "#7D7E81",light_grey = "#C1C2C4")
What I like to do is create custom color palettes by name.
custom_colors <- function(color1, color2, color3, ..., color9)
So, I would use it as shown below,
pal1 <- custom_colors(dark_blue, green, gold)
pal2 <- custom_colors(gold, orange, light_grey, dark_grey)
I want pal1u to pal2be character vectors (for passing to ggplot2)
c("#034772", "#699D46", "#F9C347")
c("#F9C347", "#EA8936", "#C1C2C4", "#58595B")