TITLE(rainbow @@ Color Rainbows)
USAGE(
rainbow(n, s=1, v=1, start=0, end=(n-1)/n)
)
ALIAS(rainbow)
ARGUMENTS(
ARG(n@@the number of colors in the rainbow.)
ARG(s,v@@the ``saturation'' and ``value'' to be used to
complete the HSV color descriptions.)
ARG(start@@the (corrected) hue at which the rainbow begins.)
ARG(end @@ the (corrected) hue at which the rainbow ends.)
)
DESCRIPTION(
This function creates a ``rainbow'' of LANG(n) colors.
Equispaced hues in RGB space tend to cluster at
the red, green and blue primaries.
This function applies an ad-hoc correction to
diminish the effect of this clustering, producing
``visually equispaced'' colors.
PARA
Some applications such as contouring require a pallette
of colors which do not ``wrap around'' to give a final
color close to the starting one.
The parameters LANG(start) and LANG(end) can be used
to specify particular subranges of hues.
The following values can be used when generating
such a subrange:
red=0, yellow=1/6, green=2/6, cyan=3/6, blue=4/6 and magenta=5/6.
PARA
The values returned by LANG(rainbow) can be used with a
LANG(col=) specification in graphics functions or in LANG(par).
)
SEEALSO(
LANG(LINK(colors)), LANG(LINK(rgb)), LANG(LINK(hsv)), LANG(LINK(gray)),
LANG(LINK(heat.colors)).
)
EXAMPLES(
# A Color Wheel
piechart(rep(1,12), col=rainbow(12))
)
