set.colours: Set a colour palette or generate one according to your...

View source: R/set.colours.R

set.coloursR 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")

Description

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")

Usage

set.colours(n, type = "categorical", gradient.choice = "dark.blue",
  categorical.choice = NULL, special = NULL)

Arguments

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

Value

Character vector containing HEX value for colours

Examples

set.colours(1,type="categorical",gradient.choice="dark.blue")

BrookfieldIIE/BFTheme documentation built on March 24, 2023, 12:42 p.m.