mean_col: Compute average color

View source: R/utils-color.R

mean_colR Documentation

Compute average color

Description

mean_col() computes an average color.

Usage

mean_col(...)

Arguments

...

Colors to average

Details

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

Value

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

See Also

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

Examples

 mean_col("black", "white")
 mean_col(c("black", "white"))
 mean_col("red", "blue")

gridpattern documentation built on June 23, 2026, 5:08 p.m.