col_pal | R Documentation |
Common interface to get color palettes from different packages: viridisLite, colorRamps, MetBrewer, href"https://github.com/karthik/wesanderson"wesanderson and RColorBrewer. Moreover three custom palettes: "custom", "dutch" and "spanish".
col_pal(name = "custom", n = 100, nbrew = NULL, reverse = F)
name |
name of the palette |
n |
number of colors to return; may not work for every palette |
nbrew |
number of color from brewer palettes |
reverse |
reverse the palette |
See available palettes: c(rev(ls("package:viridisLite"))-c(1,2), rev(ls("package:colorRamps"))-c(2,3), rownames(RColorBrewer::brewer.pal.info), names(wesanderson::wes_palettes), "custom", "dutch", "spanish", MetBrewer::MetPalettes) Use scales::show_col() to plot color grid
a color palette as character vector
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.