Col2Hex: Colour to hexadecimal conversion

View source: R/Col2Hex.R

Col2HexR Documentation

Colour to hexadecimal conversion

Description

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 (see Details), 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)

PlotTools documentation built on Sept. 11, 2024, 6:49 p.m.