Learn R Programming

patchPlot (version 0.1.5)

drawGradient: drawGradient

Description

Draw the gradient between Lab colors, as a large color patch on white background. The gradient is interpolated in Lab space, i.e. is perceptually uniform (see reference).

Usage

drawGradient(col1, col2, rgb=TRUE, numcols=200)

Arguments

col1
numeric vector of 3 values, either specifying RGB in [0,1] values, or Lab. Starting color for the gradient.
col2
numeric vector of 3 values, either specifying RGB in [0,1] values, or Lab. Ending color for the gradient.
rgb
logical, determines if col1 and col2 are in RGB or Lab color space.
numcols
number of steps in the gradient (linear) interpolation.

Value

NULL

References

Ware, C. (2004) Information visualization, from cognitive, perceptive, and visual cues point of view.

See Also

drawPatches

Examples

Run this code
drawGradient(c(1,0,0), c(0,1,0)) # gradient of one the human perceptuals channels (see reference)

Run the code above in your browser using DataLab