Skip to contents

Hex color gradient generator

Usage

gradient(colors, n)

blueYellow(
  n = 256L,
  palette = c("lightPalette", "darkPalette", "draculaPalette", "macOSLightPalette",
    "macOSDarkPalette", "iOSLightPalette", "iOSDarkPalette")
)

purpleOrange(
  n = 256L,
  palette = c("lightPalette", "darkPalette", "draculaPalette", "macOSLightPalette",
    "macOSDarkPalette", "iOSLightPalette", "iOSDarkPalette")
)

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.

palette

character(1). Color palette name.

Value

character. Hexadecimal colors in RGB space.

Note

Updated 2022-03-07.

Examples

purpleOrange(n = 3L)
#> [1] "#AF52DE" "#8E8E93" "#FF9500"
blueYellow(n = 3L)
#> [1] "#007AFF" "#000000" "#FFCC00"