Learn R Programming

gridpattern (version 1.2.1)

mean_col: Compute average color

Description

mean_col() computes an average color.

Usage

mean_col(...)

Value

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

Arguments

...

Colors to average

Details

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

Examples

Run this code
 mean_col("black", "white")
 mean_col(c("black", "white"))
 mean_col("red", "blue")

Run the code above in your browser using DataLab