ColorRamp palette extrapolating YlGnBu palette of RColorBrewer package. The original YlGnBu palette is sampled for 9 colours.

gradient_palette(n = NULL)

Arguments

n

The number of required colours. By default this is NULL.

Value

Either a function that applied to a number returns the required colours, or the actual sampling function.

See also

Examples

gradient_palette(2)
#> [1] "#FFFFD9" "#081D58"