Skip to contents

Create a viridis palette.

Usage

viridis(
  paletteLength = NULL,
  space = "rgb",
  interpolationMethod = "linear",
  bias = 1
)

Arguments

paletteLength

: Color number.

space

: A character string; interpolation in RGB or CIE Lab color spaces. See ?grDevices::colorRamp for more details. (Default "rgb")

interpolationMethod

: Use spline or linear interpolation. See ?grDevices::colorRamp for more details. (Default "linear")

bias

: A positive number. Higher values give more widely spaced colors at the high end. See ?grDevices::colorRamp for more details. (Default 1)

Value

A vector of color.

Details

viridis

Examples

viridis(9)
#> [1] "#440154" "#472C7A" "#3B518B" "#2C718E" "#21908C" "#27AD80" "#5CC862"
#> [8] "#AADC31" "#FDE725"