Description Usage Arguments Value Examples
View source: R/palette_coolors.R
Use palette_coolors
to construct palettes of desired length
1 | palette_coolors(palette_num, n, hex = FALSE, hist = TRUE)
|
palette_num |
integer; arbitrary palette identifier. Randomly generated by default, or can be specifically chosen from existing Coolors palettes using an integer between 1 and 2092. |
n |
integer; desired length of palette. Default length 5. Lengths greater than 5 will use color interpolation to create palette from original 5-color palette. |
hex |
logical; TRUE provides a character vector of hex codes. |
hist |
logical; indicates whether an object storing palette history is created/updated for the current session. Since this function's default color generation scheme is random, this allows the user to review recently-generated palettes via their identifiers, stored in a list. The most recent palette will be list item 1, the second-most recent list item 2, etc. |
A vector of colors.
1 2 3 4 5 6 7 8 | # generate random palette
palette_coolors()
# random palette of length 10
palette_coolors(n = 10)
# if you liked a specific palette, specify its identifier
palette_coolors(palette_num = 1234, n = 20)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.