c4a_palettes: Get available palette names and series

View source: R/c4a_palettes.R

c4a_palettesR Documentation

Get available palette names and series

Description

c4a_palettes lists all available cols4all color palettes. Palettes are organized by series. The available series are listed with c4a_series. Palettes are also organized per functional type, where we currently support: categorical "cat", sequential "seq", diverging "div"", cyclic "cyc", and bivariate (seq x seq "bivs", seq x cat "bivc", seq x div "bivd", seq x desaturated "bivg") palette types. The function c4a_types lists all available types. The function c4a_overview gives an overview table of the number of palette per series and type. In an IDE with auto-completion (such as RStudio) it is possible to browse through the palette names with .P (using $ like in lists).

Usage

c4a_palettes(
  type = c("all", "cat", "seq", "div", "cyc", "bivs", "bivc", "bivd", "bivg"),
  series = NULL,
  full.names = TRUE
)

c4a_series(type = c("all", "cat", "seq", "div", "cyc"), as.data.frame = TRUE)

c4a_types(series = NULL, as.data.frame = TRUE)

c4a_overview(return.matrix = FALSE, zero.count.as.NA = FALSE)

.P

Arguments

type

type of color palette: one of "all" (all palettes), "cat", "seq", "div", "cyc", "bivs", "bivc", "bivd", or "bivg". See c4a_types for descriptions.

series

series to list the palettes from. Run c4a_series to see the options.

full.names

should full names, i.e. with the prefix "series."? By default TRUE.

as.data.frame

should c4a_series and c4a_types return the result as a data.frame, with description included as a column?

return.matrix

should only a matrix be returned with numbers per palette and type? If FALSE a data.frame is returned with addional information

zero.count.as.NA

should zeros counted in the table be returned as 0 (FALSE, default) or as NA (TRUE)?

Format

An object of class environment of length 17.

Value

names of the loaded color palettes

See Also

References of the palettes: cols4all-package.

Examples

c4a_series()

c4a_types()

c4a_overview()

c4a_palettes(type = "cat", series = "tol")

c4a_palettes(type = "seq", series = "kovesi")

# handy when auto-completion is available:
.P$kovesi$seq$linear_terrain

cols4all documentation built on Oct. 17, 2024, 1:07 a.m.