This function returns a palette generated by colorRampPalette from one of the NCL palettes
Usage
ncl_theme_pal(
palette = c("ics", "icb", "icb_darkblue", "icb_brightblue", "icb_aquablue",
"icb_lightblue", "icb_nhsblue", "icb_darkgrey", "icb_midgrey", "ics_purple",
"ics_pink", "ics_limegreen", "ics_brightgreen", "ics_teal"),
reverse = FALSE,
...
)
Examples
ncl_theme_pal()
#> 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: 0x55b35bf17f98>
#> <environment: 0x55b35bf19150>
# or, specify a paltte
ncl_theme_pal("ics")
#> 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: 0x55b35bf17f98>
#> <environment: 0x55b35be1a088>
# a reverse palette
ncl_theme_pal("icb", TRUE)
#> 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: 0x55b35bf17f98>
#> <environment: 0x55b35bccf550>