hex2RGB {colorspace} | R Documentation |
This function takes a vector of strings of the form
"#RRGGBB"
(hexadecimal color descriptions) into
RGB objects.
hex2RGB(x, gamma = FALSE)
x |
a vector of hexadecimal color descriptions. |
gamma |
Whether to apply gamma-correction. |
This function converts device dependent color descriptions of the
form "#RRGGBB"
into sRGB color descriptions
(linearized if gamma
is TRUE
).
An RGB object describing the colors.
Ross Ihaka
hex
,
RGB
,
sRGB
,
HSV
,
XYZ
,
polarLAB
,
LUV
,
polarLUV
.
rgb = hex2RGB(c("#FF0000","#00FF00", "#0000FF"))