[R] Color names

Thomas Lumley tlumley at u.washington.edu
Sat Jun 28 00:34:58 CEST 2003


On Fri, 27 Jun 2003, Gabor Grothendieck wrote:

> How does one get a list of all the color names supported by
> R and the mapping between color names and hex codes?  Color
> names are things like "red", "salmon", etc.
>

colors() gives the list, and as its help page tells you, col2rgb converts
color specifications to RGB triples.  It should be fairly easy to convert
these to hex codes if you need to.

	-thomas




More information about the R-help mailing list