\Header{rgb}{RGB Color Specification}
\keyword{color}{rgb}
\begin{Description}\relax
This function creates ``colors'' corresponding to
the given intensities (between 0 and 1) of the red, green and blue primaries.
The names argument may be used to provide names for the
colors.

The values returned by \code{rgb} can be used with a
\code{col=} specification in graphics functions or in \code{par}.\end{Description}
\begin{Usage}
\begin{verbatim}
rgb(red, green, blue, names=NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{red, blue, green}] vector in \eqn{[0, 1]}{}.
\item[\code{names}] character. The names for the resulting vector.
\end{ldescription}
\end{Arguments}
\begin{SeeAlso}\relax
\code{\Link{col2rgb}} the ``inverse'' for translating \R{} colors to RGB
vectors.\\
\code{\Link{rainbow}}, \code{\Link{hsv}}, \code{\Link{gray}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
rgb(0,1,0)
u01 <- seq(0,1, length=11); all(rgb(u01,u01,u01) == gray(u01))
reds <- rgb((0:15)/15, g=0,b=0, names=paste("red",0:15,sep="."))
reds
\end{ExampleCode}
\end{Examples}

