plotPals {plotwidgets} | R Documentation |
Return all or selected color palettes
Description
Return all or selected color palettes from the plotwidget palette set
Usage
plotPals(pal = NULL, alpha = 1, drop.alpha = TRUE)
Arguments
pal |
Name of the palette(s) to return |
alpha |
Control transparency - set alpha channel to alpha (0 - fully transparent, 1 - fully opaque) |
drop.alpha |
If true, and if alpha is NULL, the "FF" string of the alpha channel will not be attached to the produced RGB codes |
Details
The plotwidgets package contains a number of predefined palettes, different from those in RColorBrewer.
-
default
: a standard, relatively safe (see below) palette -
safe
: safe for color blind persons, based on Wang B. "Points of view: Color blindeness", Nature Methods 8, 441(2011) -
neon
: a bright palette suitable for drawing on dark backgrounds -
pastel
: a dimmed pastel palette -
haze
: very delicate pastel colors -
dark
: same hues as haze, but much darker -
grey
: different shades of grey -
alphabet
: based on "A colour alphabet..." by Paul Green-Armytage -
few
: a palette based on Stephen Few's book -
zeileis
: based on Zeileis et al. 2009 -
vizi
: automatically generated palette
You can get all the names of palettes with names(plotPals()), and
showcase them with showPalettes(). Furthermore, you can use the
pal
parameter to plotwidgetGallery
to see how this
palette looks like with different plot widgets.
Value
Either a list of palettes, or (if only one palette was selected) a character vector with colors
See Also
col2rgb.2
, rgb2col
,
hsl2col
, col2hsl
,
modCol
, modhueCol
, darkenCol
, saturateCol
Examples
safe <- plotPals("safe") # colorblind-safe palette
plotwidgetGallery(pal=safe)