\HeaderA{myPalette}{Microarray color palette}{myPalette}
\begin{Description}\relax
This function returns a vector of color names corresponding to a range of colors specified in the arguments.
\end{Description}
\begin{Usage}
\begin{verbatim}
myPalette(low = "white", high = c("green", "red"), mid=NULL, k =50)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{low}] Color for the lower end of the color palette, specified using any of the three kinds of R colors, i.e., either a color name (an element of \code{\LinkA{colors}{colors}}), a hexadecimal string of the form \code{"\#rrggbb"}, or an integer \code{i} meaning \code{palette()[i]}.
\item[\code{high}] Color for the upper end of the color palette, specified
using any of the three kinds of R colors, i.e., either a color name
(an element of \code{\LinkA{colors}{colors}}), a hexadecimal string of the form
\code{"\#rrggbb"}, or an integer \code{i} meaning \code{palette()[i]}.
\item[\code{mid}] Color for the middle portion of the color palette, specified using any of the three kinds of R colors, i.e., either a color name (an element of \code{\LinkA{colors}{colors}}), a hexadecimal string of the form \code{"\#rrggbb"}, or an integer \code{i} meaning \code{palette()[i]}.
\item[\code{k}] Number of colors in the palette.
\end{ldescription}
\end{Arguments}
\begin{Value}
A "character" vector of color names. This can be used to create a user-defined color palette for subsequent graphics by \code{\LinkA{palette}{palette}}, in a \code{col=} specification in graphics functions, or in \code{\LinkA{par}{par}}.
\end{Value}
\begin{Author}\relax
Sandrine Dudoit, Yee Hwa (Jean) Yang.
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{palette}{palette}}, \code{\LinkA{rgb}{rgb}},
\code{\LinkA{colors}{colors}}, \code{\LinkA{col2rgb}{col2rgb}}, \code{\LinkA{image}{image}}, \code{\LinkA{ColorBar}{ColorBar}}, \code{\LinkA{arrayPlot}{arrayPlot}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

par(mfrow=c(1,4))
pal <- myPalette(low="red", high="green")
ColorBar(seq(-2,2, 0.2), col=pal, horizontal=FALSE, k=21)
pal <- myPalette(low="red", high="green", mid="yellow")
ColorBar(seq(-2,2, 0.2), col=pal, horizontal=FALSE, k=21)
pal <- myPalette()
ColorBar(seq(-2,2, 0.2), col=pal, horizontal=FALSE, k=21)
pal <- myPalette(low="purple", high="purple",mid="white")
ColorBar(seq(-2,2, 0.2), col=pal, horizontal=FALSE, k=21)

\end{ExampleCode}
\end{Examples}

