Skip to contents

Simple palette function generator. Creates a function with param n that dictates how many colors to return from the provided vector of hexadecimal color values. Generated functions send warning if there are not enough colors to use and it needs to recycle values.

Usage

simple_palette_factory(col, rev = FALSE, strategy = "interpolate")

Arguments

col

character vector. Hexadecimal color codes

rev

whether to reverse order of vector

strategy

policy when insufficient colors are available

Value

a function

Examples

simple_palette_factory(col = "#eb4034")
#> function (n) 
#> {
#>     get_continuous_colors(col = col, n = n, strategy = strategy)
#> }
#> <bytecode: 0x559b7292d140>
#> <environment: 0x559b74a15b48>