palette(value)
value |
a character vector containing color names or strings.
The color names should be taken from the output of colors()
and the color strings should be of the form "#RRGGBB" or "#RRGGBBAA",
giving the 2-digit hexadecimal (range 00-FF) values of the red,
green, blue, and possibly alpha (opacity) values of the colors.
The special string "default" means to use the default palette. |
oldPalette <- palette(c("#ff0000", "green", "#0000ffff", "#aabbcc77")) palette() # show canonical names for current palette colors col2rgb(3) palette(oldPalette)