gen_palette-deprecated: Generate a color palette.

gen_palette-deprecatedR Documentation

Generate a color palette.

Description

This function generates i_1, i_2, ... i_n shades and tints specified in clr.tbl for n colors clr.pal. If no clr.tbl is specified, this function generates n maximally separated colors with equal saturation and brightness from a base color.

Usage

gen_palette(clr_tbl, clr_pal = NULL, base_clr = "#6495ed")

Arguments

clr_tbl

A data.frame or matrix with two columns: the first column gives the labels to which colors need to be assigned; the second column gives the number of tints and shades that need to be generated for that color.

clr_pal

A color palette with with n colors, where n = nrow(clr_tbl).

base_clr

The base color from which to generate a color palette.

Value

A list of n items, each containing i_n shades.

See Also

fantaxtic-deprecated

Examples

clr_tbl <- data.frame(Var = c("Phylum A", "Phylum B"),
                      Freq = c(5, 8))
gen_palette(clr_tbl)
gen_palette(clr_tbl, clr_pal = c("red", "blue"))
gen_palette(clr_tbl, base_clr = "blue")

gmteunisse/Fantaxtic documentation built on June 7, 2024, 8:47 a.m.