Mix 3 primary colors (red, yellow and blue) and
return RGB code
ryb2rgb(ryb = c(0, 0, 0))
Arguments
- ryb
numeric vector range in [0,1],
e.g. c(r = 0.3, y = 0.5, b = 0.2)
Examples
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()