This help topic is for R version 0.60. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/palette.html
palette {base}R Documentation

Set or View the Graphics Palette

Description

This function is used to view or manipulate the color palette which is used when a col= has a numeric index.

If value has length 1 it is taken to be the name of a built in color palette. If value has length greater than 1 it is assumed to contain a description of the colors which are to make up the new palette (either by name or by RGB levels).

If value is omitted or has length 0, no change is made the current palette.

Currently, the only built-in palette is "default".

Usage

palette(value)

Arguments

value

an optional character vector.

Value

The palette which was in effect. This is invisible unless the argument is omitted.

See Also

colors for the vector of built-in “named” colors; hsv, gray, rainbow, terrain.colors,... to construct colors.

Examples

palette()           # obtain the current palette
palette(rainbow(6)) # six color rainbow
palette("default")  # reset back to the default

[Package base version 0.60 ]