Col2Hex {PlotTools}R Documentation

Colour to hexadecimal conversion Convert R colour to hexadecimal representation.

Description

Colour to hexadecimal conversion Convert R colour to hexadecimal representation.

Usage

Col2Hex(col, alpha = FALSE)

Arguments

col

vector of any of the three kinds of R color specifications, i.e., either a color name (as listed by colors()), a hexadecimal string of the form "#rrggbb" or "#rrggbbaa" (see rgb), or a positive integer i meaning palette()[i].

alpha

logical value indicating whether the alpha channel (opacity) values should be returned.

Author(s)

Martin R. Smith (martin.smith@durham.ac.uk)

Examples

Col2Hex(1:3)
Col2Hex(c("peachpuff", "blue"), TRUE)

[Package PlotTools version 0.3.0 Index]