get_uol_palette: Colours palette generator

Description Usage Arguments Details Value See Also Examples

View source: R/palettes.R

Description

get_uol_palette() return a vector of colours following the University of Leicester visual identity guidelines. It is possible to select the intensity of the palette, the number of colours, and the method used to pick colours. When a palette of 4-10 colours is requested, the colours in the full palette are sorted by the aforementioned method first, and then the required number of colours are selected by picking equally spaced colours on the ranks scale.

Usage

1
2
3
4
5
get_uol_palette(
  n = 3,
  intensity = c("full", "medium", "light"),
  method = c("hue", "saturation", "brightness")
)

Arguments

n

Number of colours for the desired palette. Defaults to 3.

intensity

Intensity of the desired palette. Possible values are full, medium, light. Defaults to full.

method

Method used to pick colours. Possible values are hue, saturation, brightness. Defaults to hue.

Details

It is recommended to use not more than n = 11 colours, as in that case additional colours are picked by interpolation.

Value

A vector of colours, in HEX format.

See Also

Other get palettes: get_uol_palette_manual(), get_uol_palette_mono()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
get_uol_palette()
get_uol_palette(n = 5)
get_uol_palette(n = 5, intensity = "medium")
get_uol_palette(n = 5, method = "brightness")

library(ggplot2)
pl <- get_uol_palette(n = 10)
ggplot(mpg, aes(cty, hwy, color = factor(cyl))) +
  geom_point() +
  scale_color_manual(values = pl)

ellessenne/uolvid documentation built on July 19, 2020, 8:37 a.m.