Create Color Sets Suitable for Image Palettes

DESCRIPTION:

Generate the specified number of image colors in a set.

USAGE:

cm.colors(n)
heat.colors(n)
terrain.colors(n)
topo.colors(n)

REQUIRED ARGUMENTS:

n
Number of colors to create.

VALUE:

Unnamed character vector of RGB values suitable for image color specification in image or image.palette .

SIDE EFFECTS:

None

DETAILS:

These functions create sets of image colors by generating sequences of equispaced values in the HSV color space. The cm.colors go from cyan to magenta with a middle value of white. The heat.colors go from red to white through orange and yellow. The terrain.colors go from green to white through peach earth-tones. The topo.colors combine three different sequences, with the first running from medium to light blue, the second from medium-green to yellow-green, and the third from pure yellow to navajo white.

SEE ALSO:

, , , , , help(image).

EXAMPLES:

# Generate 20 topographic colors
topo.colors(20)