plotPals | R Documentation |
Return all or selected color palettes from the plotwidget palette set
plotPals(pal = NULL, alpha = 1, drop.alpha = TRUE)
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 |
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.
Either a list of palettes, or (if only one palette was selected) a character vector with colors
col2rgb.2
, rgb2col
,
hsl2col
, col2hsl
,
modCol
, modhueCol
, darkenCol
, saturateCol
safe <- plotPals("safe") # colorblind-safe palette plotwidgetGallery(pal=safe)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.