Hex color gradient generator

gradient(colors, n)

purpleOrange(n = 256L)

blueYellow(n = 256)

Arguments

colors

character. Color names or hexadecimal values used to define the gradient.

n

integer(1). The number of colors (>= 1) to be in the palette.

Value

character. Hexadecimal colors in RGB space.

Examples

purpleOrange(n = 3L)
#> [1] "#A020F0" "#CCCCCC" "#FF8C00"
blueYellow(n = 3L)
#> [1] "#1E90FF" "#000000" "#FFFF00"