Returns the built-in color names which R knows about.
colors (distinct = FALSE) colours(distinct = FALSE)
logical indicating if the colors returned should all be
These color names can be used with a
col= specification in
An even wider variety of colors can be created with primitives
hcl, or the derived
"transparent" is not a color and so not listed, but it is
accepted as a color specification.
A character vector containing all the built-in color names.
palette for setting the ‘palette’ of colors for
rainbow for a nice example;
topo.colors for images.
col2rgb for translating to RGB numbers and extended
cl <- colors() length(cl); cl[1:20] length(cl. <- colors(TRUE)) ## only 502 of the 657 named ones ## ----------- Show all named colors and more: demo("colors") ## -----------
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.