Description Usage Arguments Details Value Examples
These are a handful of colour palettes standard within ONDRI.
1 | ondri_palette(name, start = 1, end, n, is_discrete = TRUE)
|
name |
Name of desired palette. Choices are:
|
start |
Starting index of colours desired. If omitted, starts at 1. |
end |
Ending index of colours desired. If omitted, ends at last colour in palette list. |
n |
Number of colours desired for type="continuous". If omitted, uses amount of discrete colours in range [start:end]. |
is_discrete |
Either TRUE or FALSE. Set to FALSE if you want to automatically interpolate between colours. |
This function heavily borrows from Karthik Ram's wesanderson package, and specifically https://github.com/karthik/wesanderson/blob/master/R/colors.R
A vector of colours.
1 2 3 4 5 6 7 8 9 | ondri_palette("all_colours")
ondri_palette("cohorts")
ondri_palette("cohorts", n = 20, is_discrete = FALSE)
# If you need more colours than normally found in a palette, you
# can use a continuous palette to interpolate between existing
# colours
pal <- ondri_palette(name = "all_colours", start = 3, n = 20, is_discrete = FALSE)
image(volcano, col = pal)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.