rainbow
Rainbow Colors

Description

Generates a gradient of rainbow colors.

Usage

rainbow(n, s = 1, v = 1, start = 0, end = max(1, n - 1)/n, alpha = 1)

Arguments

n the number of colors desired.
s a number or vector of n numbers between 0 and 1 giving the 'saturation' of the colors. Small numbers give washed-out colors.
v a number or vector of n numbers between 0 and 1 giving the 'value' of the colors. Small numbers give muddy colors.
start a number between 0 and 1 giving the hue of the first color. 0 and 1 are both red; the order is red, orange, yellow, green, blue, indigo, violet, and then back to red.
end a number between 0 and 1 giving the hue of the last color.
alpha a number or vector of n numbers between 0 and 1 giving the opacity of the colors.
Value
returns the vector of n color strings, equispaced in the hue-saturation-value color parameterization.
The color strings have the format "#RRGGBB" or "#RRGGBBAA" where XX are two digit hexadecimal values (range 00-FF) for the red, green, blue, and possible alpha (opacity) components of the colors.
See Also
hsv, heat.colors.
Examples
rainbow(10)
col2rgb(rainbow(10, s=0.5))
Package grDevices version 6.0.0-69
Package Index