set.colours | R Documentation |
Set a colour palette or generate one according to your specification. Refers to the main Style Guide on choosing colours that match your intention and report style. set.colours <- function(n,type = "categorical",gradient.choice = "dark.blue")
set.colours(n, type = "categorical", gradient.choice = "dark.blue",
categorical.choice = NULL, special = NULL)
n |
Integer to select the right set of colours |
type |
Either "categorical" or "gradient", decides the type of colour you're going to get |
gradient.choice |
For gradient type, specify the colour. One of: c("dark.blue","light.blue", "pink","yellow","magenta","orange","green","teal","grey") |
categorical.choice |
Specify custom colour names as a vector (same name as gradient.choice)One of: c("dark.blue","light.blue","pink","yellow","magenta","orange","green","teal","grey") |
special |
special colours, will be added in the future - opposing colours, opposing gradients |
Character vector containing HEX value for colours
set.colours(1,type="categorical",gradient.choice="dark.blue")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.