Skip to contents

Lengthen color palette

Usage

lengthen_pal(newlength = 10, shortpal)

Arguments

newlength

numeric. Length you need your new palette to be.

shortpal

A character vector of color names or hex codes; your "starter palette".

Value

a new character vector containing a new palette of length newlength

Examples

lengthen_pal(shortpal = c('red','yellow','blue'))
#>  [1] "#FF0000" "#FF3800" "#FF7100" "#FFAA00" "#FFE200" "#E2E21C" "#AAAA54"
#>  [8] "#71718D" "#3838C6" "#0000FF"