addmix {shades} | R Documentation |
Colour mixtures
Description
These functions allow colours to be mixed in any colour space, either
additively (like light) or subtractively (like paint). The infix form
%.)%
is an alternative for addmix
, and %_/%
for
submix
, with the mixing amount being fixed to 1 in these cases.
Usage
addmix(base, mixer, amount = 1, space = NULL)
submix(base, mixer, amount = 1, space = NULL)
X %.)% Y
X %_/% Y
Arguments
base , X |
A vector of base colours, or a palette function or scale. |
mixer , Y |
A vector of colours to mix in. |
amount |
The amount of each colour to mix in, relative to the amount
of the base. This will be recycled to the length of |
space |
A string giving the space in which to perform the mixing, or
|
Value
New colours of class "shade"
, or a new palette function.
Author(s)
Jon Clayden <code@clayden.org>
Examples
addmix(c("red","green","blue"), "red")
submix(c("cyan","magenta","yellow"), "cyan")
[Package shades version 1.4.0 Index]