This function allows you to generate a palette of colors using the web
https://medialab.github.io/iwanthue/
Usage
get_wants_hue(n, seed = 1, palette = "colorblind_friendly")
Arguments
- n
A numeric vector of one with the desired number of colors
- seed
A numeric vector of one with the desired seed (palettes are generated randomly)
- palette
A character vector of one with name of the palette you want to use.
To see all available palettes run names(rwantshue::hcl_presets)
.
Value
A character vector with the hex codes.
Examples
get_wants_hue(n = 5)
#> [1] "#b45093" "#65ae63" "#6b66bb" "#b7953c" "#b94e43"
get_wants_hue(n = 5, seed = 2)
#> [1] "#b94e43" "#65ad62" "#b45093" "#b7953c" "#6a67bc"
get_wants_hue(n = 5, seed = 2, palette = "fluo")
#> [1] "#ecbe6b" "#68e6c0" "#dde044" "#83e85a" "#c3e289"