These utility functions provide fluent access to CORI colors and palettes in formats ready for ggplot2.
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: 0x561809b37900>
#> <environment: 0x561809b3df20>