Skip to contents

These utility functions provide fluent access to CORI colors and palettes in formats ready for ggplot2.

Usage

cori_colors

cori_cols(...)

cori_palettes

cori_pal(palette = "ctg2gn", reverse = FALSE, ...)

Format

An object of class character of length 39.

An object of class list of length 13.

Arguments

...

Additional arguments to pass to grDevices::colorRampPalette

palette

Character name of palette in cori_palettes

reverse

Boolean indicating whether the palette should be reversed

Examples

cori_colors["Emerald"]
#>   Emerald 
#> "#00825B" 
cori_cols("Emerald")
#>   Emerald 
#> "#00825B" 
cori_palettes[["ctg2gn"]]
#>     Emerald Bright Mint 
#>   "#00825B"   "#A3E1B5" 
cori_pal("ctg7")
#> function (n) 
#> {
#>     x <- ramp(seq.int(0, 1, length.out = n))
#>     if (ncol(x) == 4L) 
#>         rgb(x[, 1L], x[, 2L], x[, 3L], x[, 4L], maxColorValue = 255)
#>     else rgb(x[, 1L], x[, 2L], x[, 3L], maxColorValue = 255)
#> }
#> <bytecode: 0x556bc0b70dd8>
#> <environment: 0x556bc0b730b0>