% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/colorspace.R
\name{mixcolor}
\alias{mixcolor}
\title{Compute the Convex Combination of Two Colors}
\usage{
mixcolor(alpha, color1, color2, where = class(color1))
}
\arguments{
\item{alpha}{The mixed color is obtained by combining an amount
\code{1 - alpha} of \code{color1} with an amount \code{alpha} of
\code{color2}.}

\item{color1}{The first color.}

\item{color2}{The second color.}

\item{where}{The color space where the mixing is to take place.}
}
\value{
The mixed color.  This is in the color space specified by
\code{where}.
}
\description{
This function can be used to compute the result of color mixing, assuming
additive mixing (e.g., as appropriate for RGB or XYZ).
}
\examples{
mixcolor(0.5, sRGB(1, 0, 0), sRGB(0, 1, 0))
}
\seealso{
\code{\link{RGB}}, \code{\link{HSV}}, \code{\link{XYZ}},
\code{\link{LAB}}, \code{\link{polarLAB}}, \code{\link{LUV}},
\code{\link{polarLUV}}.
}
\author{
Ross Ihaka
}
\keyword{color}
