color_interpolate: Interpolate between two colors

View source: R/utils_css_color.R

color_interpolateR Documentation

Interpolate between two colors

Description

Interpolate between two colors

Usage

color_interpolate(colors = c("#9A3324", "#016f90"), n, ...)

Arguments

colors

chr of hex colors

n

int of the number of colors expected

...

Arguments passed on to grDevices::colorRamp

bias

a positive number. Higher values give more widely spaced colors at the high end.

space

a character string; interpolation in RGB or CIE Lab color spaces.

interpolate

use spline or linear interpolation.

alpha

logical: should alpha channel (opacity) values be returned? It is an error to give a true value if space is specified.

Value

chr of hex values

Examples

color_interpolate(n = 3)

yogat3ch/UU documentation built on May 31, 2024, 10:14 p.m.