% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils-color.R
\name{mix_col}
\alias{mix_col}
\title{Mix colors via Munsell color space}
\usage{
mix_col(..., w = NULL, mixingMethod = "adaptive")
}
\arguments{
\item{...}{Colors to mix.  Can be individual color strings or character vectors;
all are combined into a single vector.}

\item{w}{A numeric vector of weights or proportions the same length as the combined color vector.
Defaults to equal weights.}

\item{mixingMethod}{Mixing method passed to \code{\link[aqp:mixMunsell]{aqp::mixMunsell()}}.}
}
\value{
A single R color string in hex notation.
}
\description{
\code{mix_col()} simulates subtractive (pigment) color mixing by converting
input colors to Munsell notation via \code{\link[aqp:col2Munsell]{aqp::col2Munsell()}}, mixing them with
\code{\link[aqp:mixMunsell]{aqp::mixMunsell()}}, and converting the result back to an R color string
via \code{\link[aqp:parseMunsell]{aqp::parseMunsell()}}.
}
\examples{
should_run_ex <- requireNamespace("aqp", quietly = TRUE) &&
    (interactive() || identical(Sys.getenv("IN_PKGDOWN"), "true"))
if (should_run_ex) {
  mix_col(c("red", "blue"))
}
if (should_run_ex) {
  mix_col("red", "yellow", "blue", w = c(2, 1, 1))
}
}
\seealso{
\code{\link[=mean_col]{mean_col()}} for a simpler quadratic-mean RGB approach (no extra packages required).
}
