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

Color Names

Description

Returns the built-in color names which R knows about.

Usage

colors()
colours()

Details

These color names can be used with a col= specification in graphics functions.

An even wider variety of colors can be created with primitives rgb and hsv or the derived rainbow, heat.colors, etc.

Value

A character vector containing all the built-in color names.

See Also

palette for setting the ‘palette’ of colors for par(col=<num>); rgb, hsv, hcl, gray; rainbow for a nice example; and heat.colors, topo.colors for images.

col2rgb for translating to RGB numbers and extended examples.

Examples

cl <- colors()
length(cl); cl[1:20]

[Package grDevices version 2.9.0 ]