col_to_hex | R Documentation |
Convert a color name to a hex color code.
col_to_hex(col, alpha = 1)
col |
A character string corresponding to
a supported color name (e.g., 'blue', 'darkred', etc.).
See |
alpha |
Degree of transparency from 0 (transparent) to 1 (opaque). |
# Create scatter plot for bivariate normal
plot_blank(c(-4, 4), c(-4, 4))
# Draw semi-opaque blue points
points(rnorm(1000), rnorm(1000),
pch = 19,
col = col_to_hex("blue", alpha = .3)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.