Get a color palette with a specific number of colors.
get_color_palette(
pal_func = viridis_magma_palette,
color_no = 20,
display = TRUE,
rev = FALSE,
...
)A function that returns the output function from colorRamp or
a the output of the output function from colorRamp. Default: viridis_magma_palette
The number of colors in the palette. Default: 20
A logical for displaying a pie chart of the palette. Default: TRUE
A logical that will reverse the order of the color palette.
Parameters for the pal_func.
Returns a color palette in the form of a character vector.
This function is meant to be a plugin style function for users to created palettes.
Other Color Palettes:
combination_palette(),
scico_palette(),
viridis_magma_palette(),
viridis_palette()
if (FALSE) { # \dontrun{
if(interactive()){
# This example uses data that are no longer available in the MicrobiomeR package,
# however, they can be easily generated with \code{\link{MicrobiomeR}{as_analyzed_format}}.
library(MicrobiomeR)
analyzed_silva <- as_MicrobiomeR_format(MicrobiomeR::raw_silva_2, "analyzed_format")
data <- analyzed_silva$data$stats_tax_data$Phylum
data_len <- length(unique(data))
custom_pal <- get_color_palette(color_no=data_len)
print(custom_pal)
}
} # }