rawr_palettes | R Documentation |
Functions for generating and viewing color palettes.
rawr_palettes
rawr_pal(
name,
n = NULL,
z = n,
type = c("discrete", "continuous"),
rev = FALSE
)
show_pal(x, n = Inf, fullrange = FALSE, counts = inherits(x, "imgpal"))
name |
the palette name, one of |
n |
the first |
z |
for |
type |
return a discrete or continuous (gradient) of colors |
rev |
logical; if |
x |
one of 1) a |
fullrange |
logical; for |
counts |
logical; for |
An object of class list
of length 5.
imgpal
; palette
; colorRampPalette
;
wesanderson::wes_palettes
; nord::nord_palettes
;
faulkner::faulkners
## some built-in palettes
rawr_palettes
## use or generate new palettes from existing
show_pal(rawr_pal('dfci'))
show_pal(rawr_pal('dfci', 4))
show_pal(rawr_pal('dfci', 4, 100, type = 'continuous'))
## view palettes from other sources
# show_pal(nord::nord_palettes$afternoon_prarie)
show_pal(rainbow(8))
## Not run:
filled.contour(volcano, col = rawr_pal('dfci', 4, 21, type = 'c'))
filled.contour(volcano, col = rawr_pal('dfci', z = 21, type = 'c'))
filled.contour(volcano, col = rawr_pal('pokrie', 4, 21, type = 'c'))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.