Skip to contents

Return a preset selection of colors, adjusted by alpha

Usage

tmodPal(n = NULL, set = "friendly", alpha = 0.7, func = FALSE)

Arguments

n

Number of colors to return (default: all for "friendly", 3 for everything else)

set

Which palette set (see Details).

alpha

0 for maximum transparency, 1 for no transparency.

func

if TRUE, the returned object will be a function rather than a character vector

Value

Either a character vector, or, when the func parameter is TRUE, a function that takes only one argument (a single number)

Details

A few palettes have been predefined in tmod, and this function can be used to extract them. The following palettes have been defined: * friendly -- a set of distinct, colorblind-friendly colors * bwr, rwb, ckp, pkc -- gradients (b-blue, r-red, w-white, c-cyan, k-blacK, p-purple) By default, either all colors are returned, or, if it is a gradient palette, only three.