palette_okabe_ito | R Documentation |
palette_okabe_ito()
is a wrapper around palette.colors()
that returns the
Okabe-Ito palette in R 4.0.0 or greater. palette_okabe_ito()
returns an
unnamed vector of colors for better use with ggplot2. Additionally, black is
the last color returned by palette_okabe_ito()
when 9 colors are needed
instead of the first, as in palette.colors()
.
palette_okabe_ito(order = 1:9, alpha = NULL, recycle = FALSE)
order |
A numeric vector, the order of the colors, or a character vector
of color names, of: "black", "orange", "skyblue", "bluishgreen", "yellow",
"blue", "vermillion", "reddishpurple", "gray". If |
alpha |
an alpha-transparency level in the range [0,1] (0 means transparent and 1 means opaque). |
recycle |
logical indicating what happens in case |
A character vector of hex codes
palette_okabe_ito()
palette_okabe_ito(order = c(2, 3, 5), alpha = 0.9)
palette_okabe_ito(order = c("bluishgreen", "yellow", "blue"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.