wwfc_pal: Return a function to interpolate an wwfc colour palette

Description Usage Arguments Details Examples

View source: R/palettes.R

Description

A function that is mainly intended for internal package use. Gets a pallete by name from a list. Uses a boolean condition determining whether to reverse the order or not, and additional arguments to pass on to colorRampPallete() (such as an alpha value).

Usage

1
wwfc_pal(palette = "wooly_bully", reverse = FALSE, ...)

Arguments

palette

Character name of palette in wwfc_palettes

reverse

logical indicating whether the palette should be reversed

...

Additional arguments to pass to colorRampPalette()

Details

Returns another function, which will interpolate the palette colors for a certain number of levels, making it possible to create shades between our original colours.

The complete list of options is "wooly_bully" (the default) & "sir_jack". Use e.g. view_palette("wooly_bully") to see the 5 core colours that make up a palette.

Examples

1
2
wwfc_pal("wooly_bully")(8)
wwfc_pal("sir_jack")(12)

lizardburns/wwplot documentation built on Jan. 5, 2022, 12:26 a.m.