tate_palette: Generate colour palette

View source: R/tate_palette.R

tate_paletteR Documentation

Generate colour palette

Description

A function to generate a colour palette based on the available palettes in tate.

Usage

tate_palette(
  name,
  n = NULL,
  type = "discrete",
  direction = 1,
  friendly = FALSE,
  display = FALSE
)

Arguments

name

character. Name of desired palette. Either: Cholmondeley, Copley, Blake, Turner, Millais, Sargent, Waterhouse, Grant, Lowry, Bacon, Hockney or All, if all are desired.

n

numeric. Number of requested colours. If no value is provided, the default number of colours is returned.

type

character. Type of colour scale. Either "continuous" or "discrete". Use "continuous" if you want to automatically interpolate between colours.

direction

numeric. Sets the orders of colours in the scale. Default order is 1. Palette is reversed by specifying -1.

friendly

logical. Should non-colourblind friendly palettes be removed?

display

logical. Should the colour palette be displayed?

Value

A vector of hex colour codes.

Examples

tate_palette(name = "Hockney", display = TRUE)
tate_palette(name = "Sargent", n = 1000, type = "continuous", display = TRUE)
tate_palette(name = "All", display = TRUE)
tate_palette(name = "All", friendly = TRUE, display = TRUE)

LewisAJones/london documentation built on Aug. 31, 2022, 10:55 p.m.