\HeaderA{gray.colors}{Gray Color Palette}{gray.colors}
\aliasA{grey.colors}{gray.colors}{grey.colors}
\keyword{color}{gray.colors}
\begin{Description}\relax
Create a vector of \code{n} gamma-corrected gray colors.
\end{Description}
\begin{Usage}
\begin{verbatim}
gray.colors(n, start = 0.3, end = 0.9, gamma = 2.2)
grey.colors(n, start = 0.3, end = 0.9, gamma = 2.2)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{n}] the number of gray colors (\eqn{\ge 1}{>= 1}) to be in the
palette.
\item[\code{start}] starting gray level in the palette (should be between
\code{0} and \code{1} where zero indicates \code{"black"} and one
indicates \code{"white"}).
\item[\code{end}] ending gray level in the palette.
\item[\code{gamma}] the gamma correction.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The function \code{gray.colors} chooses a series of \code{n}
gamma-corrected gray levels between \code{start} and \code{end}:
\eqn{(\mathit{start}^\gamma, \dots,
\mathit{end}^\gamma)^(1/\gamma)}{seq(start^gamma, end^gamma, length
= n)^(1/gamma)}.
The returned palette contains the corresponding gray colors.
This palette is used in \code{\LinkA{barplot.default}{barplot.default}}.

\code{grey.colors} is an alias for \code{gray.colors}.
\end{Details}
\begin{Value}
A vector of \code{n} gray colors.
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{gray}{gray}},
\code{\LinkA{rainbow}{rainbow}},
\code{\LinkA{palette}{palette}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
require(graphics)

pie(rep(1,12), col = gray.colors(12))
barplot(1:12, col = gray.colors(12))
\end{ExampleCode}
\end{Examples}

