gray.colors
Groups of Colors

### Description

Generates groups of related colors.

### Usage

    gray.colors(n, start = 0.3, end = 0.9, gamma = 2.2, alpha = NULL)
    grey.colors(n, start = 0.3, end = 0.9, gamma = 2.2, alpha = NULL)
    heat.colors(n, alpha = 1)
    terrain.colors(n, alpha = 1)
    topo.colors(n, alpha = 1)
    cm.colors(n, alpha = 1)

### Arguments

n | a positive integer. The number of colors desired.
start | for gray.colors and grey.colors only. A number between 0 and 1 giving the darkness of the first output color.
end | for gray.colors and grey.colors only. A number between 0 and 1 giving the darkness of the last output color.
gamma | for gray.colors and grey.colors only. A positive number giving the 'gamma correction'. The sequence of of gray values will be seq(start^gamma, end^gamma, length.out = n)^(1/gamma).
alpha | a number or a vector of numbers of length n between 0 and 1 giving the opacity of the colors. If NULL, it does not include the opacity in the color string.

Value

gray.colors | returns a gradient of n gray colors.
grey.colors | returns a gradient of n grey colors.
heat.colors | returns n colors on a gradient from red through yellow to white.
terrain.colors | returns n colors on gradient from green to pink.
topo.colors | returns n colors with a the first third blues, the second third greens, and the last third a gradient from yellow to pink.
cm.colors | returns n pastels.

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.
Note
gray.colors and grey.colors are identical functions.
See Also
rainbow, rgb, col2rgb, hsv.
Examples

    gray.colors(5)
    gray.colors(5, start=0.5, end=1)
    topo.colors(5, alpha=NULL)
    col2rgb(terrain.colors(12, alpha=NULL))
    heat.colors(12)
    cm.colors(12, alpha=NULL)

Package grDevices version 6.1.5-18
Package Index