ryb2rgb | R Documentation |
Mix 3 primary colors (red, yellow and blue) and return RGB code
ryb2rgb(ryb = c(0, 0, 0))
ryb |
numeric vector range in [0,1], e.g. c(r = 0.3, y = 0.5, b = 0.2) |
see above
RGB code
library(scales)
library(dplyr)
data.frame(
red = c(1,0,0),
yellow = c(0,1,0),
blue = c(0,0,1),
orange = c(1,1,0),
purple = c(1,0,1),
green = c(0,1,1),
black = c(1,1,1),
grey = c(0.5,0.5,0.5),
white = c(0,0,0)
) %>%
apply(2, ryb2rgb) %>%
show_col()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.