Skip to contents

The categorical chart palette (--shad-chart-1 … --shad-chart-6) for a theme, converted to hex for use with R plotting libraries.

Usage

shad_chart_colors(n = 6, preset = NULL, dark = FALSE)

Arguments

n

Number of colors (recycled past 6, with a warning).

preset

Theme preset (see shad_tokens()); NULL = base.

dark

If TRUE, use dark-mode values.

Value

A character vector of #rrggbb hex colors.

Examples

shad_chart_colors(3)
#> [1] "#F54900" "#009689" "#104E64"
shad_chart_colors(4, preset = "blue")
#> [1] "#155DFC" "#00B8DB" "#8E51FF" "#22C55E"