Learn R Programming

rleafmap (version 0.2.1)

col2hexa: Convert colors to hexadecimal format

Description

This function converts any color of the R system to hexadecimal format.

Usage

col2hexa(x, alpha.channel = FALSE, alpha = 1, charstring = TRUE)

Value

A character vector of hexadecimal values.

Arguments

x

a vector of any of the three kinds of R color specifications.

alpha.channel

logical. Sould an alpha channel included in the output? Default is FALSE.

alpha

a vector of numeric values in \([0, 1]\). Recycled if necessary.

charstring

logical. Sould resulting elements be surrounded by quotation marks? Default is TRUE.

See Also

col2rgb for translating R colors to RGB vectors.