col2bgr | R Documentation |
R color to BRG (blue/green/red) conversion.
col2bgr(col, alpha = FALSE)
col |
Vector of any of the three kinds of R color specifications, i.e.,
either a color name (as listed by |
alpha |
Logical value indicating whether the alpha channel (opacity) values should be returned. |
NA
(as integer or character) and "NA" mean transparent.
Values of col
not of one of these types are coerced: real vectors are
coerced to integer and other types to character. (factors are coerced to
character: in all other cases the class is ignored when doing the coercion.)
Zero and negative values of col
are an error.
An integer matrix with three or four (for alpha = TRUE
) rows
and number of columns the length of col
. If col has names these are
used as the column names of the return value.
Simon Garnier, garnier@njit.edu
col2rgb
, rgb
, palette
col2bgr("red")
col2bgr(1:10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.