Skip to contents

[color()] returns the requested columns, returns NA if absent. [color_pattern()] returns all colors that start with the pattern.

Usage

color(..., unname = TRUE)

color_pattern(pattern, unname = TRUE)

Arguments

...

Character names of colors. If NULL returns all colors.

unname

Boolean. Should the output vector be unnamed? Default to `TRUE`.

pattern

Pattern of the start of colors' name.

Value

Hex codes named or unnamed.

Naming of colors

* All branding colors start with "branding"; * All , categorical colors start with ", cat_"; * All sequential colors start with "seq_";

Then, a number indicates the number of colors that belong to the palettes, a string the name of the palette, and, finally, a number the position of the color. E.g., "seq_5_red_4" would be the 4th color of a continuous palettes of 5 colors in the red band. Exception is made for white, light_grey, dark_grey, and black.