Description Usage Arguments Details Value See Also Examples
Convert any [R] color to RGB (red, green, blue) values. Accepted color
values are 1) a color name (an element of colors()
), 2) a
a hexadecimal string of the form "#rrggbb"
, or 3) an integer
i
meaning palette()[i]
.
1 |
col |
vector of any of the three kind of [R] colors described in the description section. |
... |
Not used. |
This method is just a wrapper for col2rgb()
in the [R] base
package and included to collect color functions at one place.
Returns an integer
matrix
with the three rows red
, green
,
and blue
. The columns contains the RGB value for each color.
*rgbToColors()
.
col2rgb
, rgb
.
For more information see Colors
.
1 2 3 4 5 6 | Colors$colorsToRGB(c(6, "blue", "#3366ff"))
# [,1] [,2] [,3]
# red 255 0 51
# green 0 0 102
# blue 255 255 255
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.