Skip to contents

mean_col() computes an average color.

Usage

mean_col(...)

Arguments

...

Colors to average

Value

A color string of 9 characters: "#" followed by the red, blue, green, and alpha values in hexadecimal.

Details

We currently compute an average color by using the quadratic mean of the colors' RGBA values.

See also

mix_col() for subtractive (pigment) mixing via Munsell color space.

Examples

 mean_col("black", "white")
#> [1] "#B4B4B4FF"
 mean_col(c("black", "white"))
#> [1] "#B4B4B4FF"
 mean_col("red", "blue")
#> [1] "#B400B4FF"