toRGB | R Documentation |
Convert R colours to RGBA hexadecimal colour values
toRGB(x, alpha = 1)
x |
see the |
alpha |
alpha channel on 0-1 scale |
hexadecimal colour value (if is.na(x), return "transparent" for compatibility with Plotly)
showRGB()
toRGB("steelblue") # [1] "rgba(70,130,180,1)" m <- list( color = toRGB("red"), line = list( color = toRGB("black"), width = 19 ) ) plot_ly(x = 1, y = 1, marker = m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.