Skip to contents

Used to retrieve a single color or vector of colors from the Faunalytics color palette. In order, colors included are: green, amber (or orange), red, dark blue, light blue, blue. The following are not part of the Faunalytics color palette, but will be returned when requested: black, white, gray, light gray, dark gray. Variations of grays spelled with an "e" (e.g., dark grey) will also work.

Usage

fauna_colors(..., nameless = FALSE, cbf = FALSE)

Arguments

...

One of the following: color name(s) in quotes, a number of desired colors (no more than 6), or nothing. Quoted colors must be a part of the Faunalytics color palette. If no value is provided, this function will return the base color palette with names.

nameless

Return values without names when needed. FALSE by default.

cbf

The current Faunalytics color palette is not colorblind-friendly. Setting this argument to TRUE will override the default Faunalytics palette and replace it with a colorblind-friendly palette (viridis::turbo). FALSE by default.

Value

A named color hex code or named vector of color hex codes

Examples

fauna_colors("green")
#>     green 
#> "#73A753" 
fauna_colors("orange", "lightblue")
#>    orange lightblue 
#> "#FF8F2D" "#5FB7E5" 
fauna_colors(4)
#>     green     amber       red  darkblue 
#> "#73A753" "#FF8F2D" "#E64B3D" "#254C59"