| hex2rgb | R Documentation |
Convert a single HEX color string or a character vector of HEX strings to RGB
numeric components. The function accepts values with or without a leading
#. Messaging uses cli if available and falls back to message().
hex2rgb(hex)
hex |
Character. A HEX color string (e.g. |
If hex has length 1, a named numeric vector with elements
c(r, g, b). If hex has length > 1, a named list where each element is
a named numeric vector for the corresponding input.
hex2rgb("#FF8000")
hex2rgb(c("#FF8000", "#00FF00"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.