cbf_palette | R Documentation |
cbf_palette
returns a colour friendly palette
cbf_palette(x = 8, named = FALSE)
x |
numeric/character/factor |
named |
logical should the vector be named. default = FALSE |
These colours come from https://jfly.uni-koeln.de/color Accepts either a number, or a character/factor vector If the supplied vale is a number, a vector of the specified length is returned. If a character vector is supplied, a vector of the same length is returned. If a factor vector is supplied, a vector of the same length as the number of factor levels is returned.
If the length of the requested palette is greater than 8, a warning is generated. If the length is 9 or 10, a palette containing greys is returned with a warning. If the length greater than 10, a palette of length 10 containing greys is returned with a warning.
If no value supplied the a palette of 8 colours is returned. This palette is intended for categorical data.
named vector of colours
cbf_palette()
cbf_palette(4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.