colourPal: Flexible RColorBrewer Palettes

Description Usage Arguments Value See Also

Description

Retrieve an RColorBrewer Palette of desired type. The default palettes are 'YlOrBr' for sequential palettes, 'RdBu' for qualitative palettes and 'Dark2' for qualitative palettes. Options to reverse or shuffle the palette prior to returning. Note that in the default RColorBrewer configuration, the warmer colours in the divergent palettes are at the start rather than the end of the scales. In this function, all divergent palettes are by default reversed, such that the RdBu palette for example will go from Blue to Red rather than the original Red to Blue.

Usage

1
2
colourPal(name = NULL, len = NULL, type = "seq", reverse = F,
  shuffle = F, alpha = NA)

Arguments

name

a character string. Default: NULL

len

desired length of output palette. Note that if the length is larger than the maximum number of colours in the palette, the maximum number of colours will be returned. Default: NULL

type

a character string indicating the type of palette desired. One of 'seq', 'sequential', 'div', 'diverging', 'qual', or 'qualitative'. Default: 'seq'

reverse

a boolean value indicating whether the palette should be returned in reverse order. Note that for diverging palettes, this will effectively restore the original palette order since the function by default reverses them (see also Description). Default: F

shuffle

a boolean value indicating whether the palette should be shuffled prior to return. Default: F

alpha

modify colour transparency. 'NA' or numeric value between 0 and 1. Default: NA

Value

a character vector of colours.

See Also

RColorBrewer


jlaffy/brewerland documentation built on June 27, 2019, 3:36 a.m.