#set TITLE = "colors"
#include top

.SH DESCRIPTION
\fBcolor\fR attributes control the color of lines, filled areas, and text.

.sp 2
.ig >>
<a href="../gallery/colors.htm">colors<br><img src="../gallery/colors.gif"></a>
.>>
.sp 2

.SH HOW TO SPECIFY A COLOR
Colors may be specified by \fBpre-defined name\fR, by \fBRGB\fR specification, 
by \fBgray level\fR specification, 
or \fBHSB\fR specification (PostScript only).
\fBHatch patterns\fR may also be used as colors, for rectangular areas
such as bars.
In addition, when rendering in PNG, GIF, or EPS, the special color 
\fCtransparent\fR may be used to create images with transparent background
(\fCtransparent\fR is the default for EPS).

.SH EXAMPLE
Almost all of the examples in the gallery use colors;
one is 
.ig >>
<a href="../gallery/bars3.htm">
.>>
 bars3
.ig >>
</a>
.>>

.SH PRE-DEFINED COLOR NAME
A number of named colors have been defined.  These include:
.ft C
.nf
       predefined       equivalent
       color name      R G B values
       ----------      ------------
         white         1 1 1 
         black         0 0 0 

         red           1 0 0 
         magenta       1 .3 .5 
         tan1         .9 .83 .79 
         tan2         .7 .6 .6 
         coral         1 .6 .6 
         claret       .7 .3 .3 
         pink        1.0 .8 .8 

         orange      1 .62 .14 
         redorange   1 .5 0 
         lightorange 1 .80 .60  ;
 
         yellow        1 1 0 
         yellow2       .92 .92 0 
         dullyellow    1 .9 .6 
         yelloworange  1 .85 0 
 
         brightgreen   0 1 0 
         green         0 .7 0 
         teal         .0 0.5 .2 
         drabgreen    .6 .8 .6 
         kelleygreen  .3 .6 .3 
         yellowgreen  .6 .9 .6 
         limegreen    .8 1 .7 
 
         brightblue   0 0 1 
         blue         0 .4 .8 
         powderblue   .7 .7 1 
         skyblue      .7 .8 1 
         cobaltblue   .6 .6 1 
         darkblue     0 0 .60 
         oceanblue    0 .5 .8 
 
         purple      .47 0 .47 
         lightpurple .67 .3 .67 
         lavender    .8 .7 .8 
.fi
.ft R
.LP
Example: \fCcolor: blue\fR


.SH RGB SPECIFICATION
If none of the pre-named colors suit, 
a custom RGB specification in the form of
\fCrgb(\fIR\fR,\fIG\fR,\fIB\fR)\fR may be used.
\fIR\fR, \fIG\fR, \fIB\fR are values from 0.0 to 1.0 (1.0 is brightest)
specify the red, green and blue components.
No embedded spaces are allowed.
The values may be separated by a comma (as above), or by color (:), dash (-), or
pipe (|).
.LP
Example: \fCcolor: rgb(0.4,0.84,0.37)\fR

.SH GRAY-LEVEL SPECIFICATION
A gray-level specification in the form of
\fCgray(\fIG\fC)\fR or just \fIG\fR,
where \fIG\fR is 0.0-1.0 grey level (1.0 is white).
No embeddded spaces are allowed.
The values may be separated by a comma (as above), or by color (:), dash (-), or
pipe (|).
.LP
Please note that PostScript printers can vary considerably 
as to the relative darkness of a rendered grey area.
.LP
Example: \fCcolor: gray(0.8)\fR

.SH HSB SPECIFICATION
HSB color specifications are valid only with PostScript / EPS.
An HSB (hue saturation and brightness) specification in the form of
\fChsb(\fIH\fR,\fIS\fR,\fIB\fR)\fR,
where \fIR\fR, \fIG\fR, \fIB\fR are values from 0.0 to 1.0.
No embedded spaces are allowed.
The values may be separated by a comma (as above), or by color (:), dash (-), or
pipe (|).

.SH CMYK SPECIFICATION
CMYK color specifications are valid only with PostScript / EPS.
A CMYK  (cyan, magenta, yellow, black) specification in the form of
\fCcmyk(\fIC\fC,\fIM\fC,\fIY\fC,\fIK\fC)\fR
where \fIC\fC, \fIM\fC, \fIY\fC, and \fIK\fR are values from 0.0 through 1.0.
No embedded spaces are allowed.
The values may be separated by a comma (as above), or by color (:), dash (-), or
pipe (|).


.SH HATCH PATTERNS
\fBHatch patterns\fR may be used as colors to fill rectangular areas
such as bars.  These are most useful when rendering in PostScript
for monochrome hard copy, for situations where the available 
gray-level gradations do not provide enough distinct variations.
Hatch patterns are specified in the form of \fChatch\fR\fIn\fR
where \fIn\fR is 1 - 9.  \fChatch1\fR is the lightest and
\fChatch9\fR is the darkest.  The hatch line color is always black.
Hatch patterns may only be used to fill rectangular areas such as bars;
they won't work for pie graphs or rangesweeps.  (Introduced in version 1.3)
.ig >>
<br>
<img src="../gallery/hatch.gif">
.>>

#include bottom
