Skip to contents

This function returns a palette generated by colorRampPalette from one of the BSOL palettes

Usage

bsol_theme_pal(
  palette = c("main", "alternative", "ics_blue", "ics_orange", "ics_green", "ics_purple",
    "ics_navy"),
  reverse = FALSE,
  ...
)

Arguments

palette

The name of palette to use

reverse

Optional: boolean value to reverse the palette

...

arguments to pass to colorRamp

Value

A colorRamp function

Examples

bsol_theme_pal("main")
#> 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: 0x561a7ba40158>
#> <environment: 0x561a7ba42e40>
# or, specify a palette
bsol_theme_pal("ics_orange")
#> 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: 0x561a7ba40158>
#> <environment: 0x561a7bad98f0>
# a reverse palette
bsol_theme_pal("main", 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: 0x561a7ba40158>
#> <environment: 0x561a7bb4fef8>