linPal: Create linear palette in RGB color space

View source: R/colors.R

linPalR Documentation

Create linear palette in RGB color space

Description

Create a color gradient to use for plotting continuous values.

Usage

linPal(from = "#FFFFFF", to = "#E51636", n = 256, alpha = NULL)

Arguments

from

first RGB color

to

last RGB color

n

number colors in output

alpha

optional: if not NULL, alpha (transparency) value for all colors

Value

A palette of colors of length 'n' where the first and last color are equal to 'from' and 'to', and the R, G and B values are linearly interpolated between those in 'from' and 'to'.

Examples

?

thartbm/SMCL documentation built on Oct. 23, 2022, 5:17 a.m.