Description Usage Arguments Author(s) Examples
ng_palette_d()
and ng_palette_c()
(respectively for discrete
and continuous palettes) return functions that take an integer argument (the
required number of colours) and return a character vector of colours' hex
codes.
In addition, the functions also recognize the
viridis
palettes: "magma" (or "A"),
"inferno" ("B"), "plasma" ("C"), "viridis" ("D"), or "cividis" ("D").
1 2 3 4 5 | ng_palette_d(name = "all", reverse = FALSE)
ng_palette_c(name = "magma", reverse = FALSE, ...)
display_ng_palettes()
|
name |
Character name of the Nightingale (or viridis) colour palette. |
reverse |
Boolean indicating whether the palette should be reversed. |
... |
Additional arguments to pass to
|
Ilari Scheinin
1 2 3 4 5 6 7 8 | #' # Display Nightingale's colour palettes
display_ng_palettes()
# Get 4 colours along the spectrum of the nwr palette
ng_palette_d("nwr")(4)
# Notice that the discrete palette "light", cannot return more than 5 colours
ng_palette_d("light")(6)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.