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: 0x558155cc0968>
#> <environment: 0x55814f1ca470>