Invert a color or calculate the mean of two colors in HSV or RGB space. This may be useful in creating colors for plots
colorOp(col, fn = c("invert", "mean"), space = c("HSV", "RGB"))
Input color(s)
String: "invert", "mean": Function to perform
String: "HSV", "RGB": Colorspace to operate in - for averaging only
Color
The average of two colors in RGB space will often pass through gray, which is likely undesirable. Averaging in HSV space, better for most applications.