set_col: For setting colours and associated densities.

Description Usage Arguments Value Note Author(s) References

View source: R/set_col.R

Description

Specify a colour by name, and alter the density without having to convert to RGB.

Usage

1
set_col(col, den = 255)

Arguments

col

character. Name of colour.

den

numeric. Density range from 0 (transparent) to 255 (opaque).

Value

A colour hex code, for use in plotting etc.

Note

col can have length greater than 1, and the function will output a character of the same length.

Author(s)

Will Haese-Hill

References

For a list of named colours recognised by R, see: http://www.stat.columbia.edu/~tzheng/files/Rcolor.pdf.


jgrevel/BAST1-R-Library documentation built on May 21, 2019, 10:11 a.m.