mix: Creates an object of class "color" as a mixture of the colors...

Description Usage Arguments Value Examples

Description

Creates an object of class "color" as a mixture of the colors it receives as input.

Usage

1
2
mix(..., method = "light", average = method == "paint",
  output = "hex")

Arguments

...

Colors to be mixed. Hexcode, c(r,g,b), color name as character and "color" class object are all supported.

method

Type of mixture ("light" or "paint") to be made. Defaults to "light"

average

If TRUE, the function will return the average color of the inputs. If FALSE, the function will add the inputs together. When working with "paint" method, average=TRUE is recommended to represent accurately the mixture of actual paint from idfferent colors.

output

Format in which output will be returned. Use "hex" to get a hexcode. Use "color" for a "color" class object to be returned. Use "paint" for result expression in YMCK palette Defaults to "hex"

Value

A hexcode, YMCK vector or class "color" object resulting of a mixture of the inputted colors

Examples

1
2
mix("red", "blue", method="light")
mix("red", "blue", method="paint")

dpcarballo/coloR documentation built on June 1, 2019, 8:14 p.m.