Skip to contents

Uses the function grDevices::palette.colors() to generate discrete color palettes using the following rules:

  • n <= 9: "Okabe-Ito".

  • n == 10: "Tableau 10"

  • n > 10 && n <= 12: "Paired"

  • n > 12 && n <= 26: "Alphabet"

  • n > 26 && n <= 36: "Polychrome 36"

Usage

utils_color_discrete_default(n = NULL)

Arguments

n

(required, integer) number of colors (up to 36) to generate. Default: NULL

Value

color vector

Examples


utils_color_discrete_default(n = 9)
#> [1] "#000000" "#E69F00" "#56B4E9" "#009E73" "#F0E442" "#0072B2" "#D55E00"
#> [8] "#CC79A7" "#999999"