greens | R Documentation |
greens
is useful for getting a set of colors from chartreuse to
forest green for graphs. These are from the RColorBrewer package, color set
"YlGn", just to give credit where it's due, but they can be any number in
length rather than only up to 9 colors.
greens(ncolors, shade = "regular")
ncolors |
number of colors desired |
shade |
the shade of colors to use, which can be "regular" (default), "darker", or "lighter" |
a character vector of colors
# Create a set of 10 colors that are deepening shades of green.
greens(10)
# Try using scales::show_col() to visualize the colors, ex:
scales::show_col(greens(ncolors = 10))
scales::show_col(greens(ncolors = 10, shade = "darker"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.