ColToRgb {DescTools} | R Documentation |
Color to RGB Conversion
Description
R color to RGB (red/green/blue) conversion.
Usage
ColToRgb(col, alpha = FALSE)
Arguments
col |
vector of any of the three kind of R colors, i.e., either a color name (an element of |
alpha |
logical value indicating whether alpha channel (opacity) values should be returned. |
Details
This is merely a wrapper to col2rgb
, defined in order to follow this package's naming conventions.
Value
A matrix with a column for each color. The three rows of the matrix indicate red, green and blue value and are named "red", "green", and "blue" accordingly. The matrix might have a 4th row if an alpha channel is requested.
Author(s)
Andri Signorell <andri@signorell.net>
See Also
Examples
ColToRgb("peachpuff")
ColToRgb(c(blu = "royalblue", reddish = "tomato")) # names kept
ColToRgb(1:8)
[Package DescTools version 0.99.55 Index]