Blend two or more colors together

blend_colors(..., as.rgb = FALSE)

Arguments

...

Two or more colors to blend together; these can be in a vector or standalone

as.rgb

Return in RGB form, otherwise return in hexadecimal form

Value

The blended color in RGB form (1 x 3 matrix) or hexadecimal form

See also

Other color_theory: col2hex(), contrast-theory, text_color()

Examples

blend_colors('red', 'green')
#> [1] "#7F7F00FF"
if (requireNamespace('scales', quietly = TRUE)) {
  scales::show_col(c('red', blend_colors('red', 'green'), 'green'), ncol = 3)
}