friendly_pal | R Documentation |
Code is based on the wes anderson package https://github.com/karthik/wesanderson These are a handful of color palettes that are color blind friendly.
friendly_pal(name, n, type = c("discrete", "continuous"))
name |
Name of desired palette. Choices are:
|
n |
Number of colors desired. |
type |
Either "continuous" or "discrete". Use continuous if you want to automatically interpolate between colours. @importFrom graphics rgb rect par image text |
A vector of colours.
friendly_pal("bright_seven")
friendly_pal("contrast_three")
friendly_pal("vibrant_seven")
friendly_pal("vibrant_seven", 3)
# If you need more colours than normally found in a palette, you
# can use a continuous palette to interpolate between existing
# colours
pal <- friendly_pal(21, name = "muted_nine", type = "continuous")
image(volcano, col = pal)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.