average_colors: Determine the numerical average of a vector of colors

Description Usage Arguments Details Value

View source: R/average_colors.R

Description

Convert a vector of colors into a single color that averages their numerical values of RGB (red-green-blue) or Lab (lightness-a-b) characteristics.

Usage

1
average_color(x, method="RGB")

Arguments

x

vector of color names to average

method

character, specificying the color space in which to average. Currently only "RGB" is accepted.

Details

Solution derived from answer by stackoverflow user Deleplace at https://stackoverflow.com/questions/14482226/how-can-i-get-the-color-halfway-between-two-colors

Value

character, the hexadecimal representation of the color


mjdufort/miscHelpers documentation built on Nov. 18, 2018, 9:20 p.m.