ryb2rgb: Mix RYB color

View source: R/Colors.R

ryb2rgbR Documentation

Mix RYB color

Description

Mix 3 primary colors (red, yellow and blue) and return RGB code

Usage

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)

Details

see above

Value

RGB code

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()

huayc09/SeuratExtend documentation built on July 15, 2024, 6:22 p.m.