Debian Codegraph @

man/mixcolor.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/colorspace.R
3 \name{mixcolor}
4 \alias{mixcolor}
5 \title{Compute the Convex Combination of Two Colors}
6 \usage{
7 mixcolor(alpha, color1, color2, where = class(color1))
8 }
9 \arguments{
10 \item{alpha}{The mixed color is obtained by combining an amount
11 \code{1 - alpha} of \code{color1} with an amount \code{alpha} of
12 \code{color2}.}
13
14 \item{color1}{The first color.}
15
16 \item{color2}{The second color.}
17
18 \item{where}{The color space where the mixing is to take place.}
19 }
20 \value{
21 The mixed color. This is in the color space specified by
22 \code{where}.
23 }
24 \description{
25 This function can be used to compute the result of color mixing, assuming
26 additive mixing (e.g., as appropriate for RGB or XYZ).
27 }
28 \examples{
29 mixcolor(0.5, sRGB(1, 0, 0), sRGB(0, 1, 0))
30 }
31 \seealso{
32 \code{\link{RGB}}, \code{\link{HSV}}, \code{\link{XYZ}},
33 \code{\link{LAB}}, \code{\link{polarLAB}}, \code{\link{LUV}},
34 \code{\link{polarLUV}}.
35 }
36 \author{
37 Ross Ihaka
38 }
39 \keyword{color}