hc_pal: Highcharts color palette (discrete)

View source: R/hc.R

hc_palR Documentation

Highcharts color palette (discrete)

Description

Highcharts uses many different color palettes in its plots. This collects the palettes shipped with Highcharts 13, plus the default Highcharts used before v11.

Usage

hc_pal(palette = "default")

Arguments

palette

character The name of the Highcharts palette to use. One of \Sexpr[results=rd]{ggthemes:::rd_optlist(names(ggthemes::ggthemes_data$hc))}.

Details

"default" and "default_dark" are the light- and dark-mode forms of the palette Highcharts has used by default since v11.0.0; they differ only in positions 2 and 3. "classic" is the default Highcharts used from v5.0.0 through v10.x. The remaining palettes come from the themes bundled with Highcharts.

Note that "avocado" and "sunset" have only four colors.

Value

A palette function. It takes the number of colours n and returns a character vector of n hex colours, and can be used as the palette argument of discrete_scale().

See Also

Other colour hc: scale_colour_hc()

Examples

hc_pal()(6)

scales::show_col(hc_pal("darkunica")(4))

ggthemes documentation built on Oct. 4, 2026, 1:06 a.m.