Function: plotcolor
Section: graphic
C-Name: plotcolor
Prototype: LG
Help: plotcolor(w,c): in rectwindow w, set default color to c. Possible
 values for c are [R,G,B] values, a color name or an index in the
 graphcolormap default: factory settings
 are 0=white, 1=black, 2=blue, 3=sienna, 4=red, 5=green, 6=grey, 7=gainsborough.
 Return [R,G,B] value attached to color.
Doc: set default color to $c$ in rectwindow $w$. Return [R,G,B] value attached
 to color. Possible values for $c$ are

 \item a \typ{VEC} or \typ{VECSMALL} $[R,G,B]$ giving the color RGB value
 (all 3 values are between 0 and 255), e.g. \kbd{[250,235,215]} or
 equivalently \kbd{[0xfa, 0xeb, 0xd7]} for \kbd{antiquewhite};

 \item a \typ{STR} giving a valid colour name (see the \kbd{rgb.txt}
 file in X11 distributions), e.g. \kbd{"antiquewhite"} or an RGV
 value given by a \kbd{\#} followed by 6 hexadecimal digits, e.g.
 \kbd{"\#faebd7"} for \kbd{antiquewhite};

 \item a \typ{INT}, an index in the \tet{graphcolormap} default, factory
 setting are

 0=white, 1=black, 2=blue, 3=violetred, 4=red, 5=green, 6=grey, 7=gainsborough

 and the color index is a non-negative integer in $[0,7]$.
 But this can be changed (see \kbd{??graphcolormap}); note that for historical
 reasons, \kbd{graphcolormap} is 0-based, so the color $c$ is a non-negative
 integer, strictly less than the length of the colormap.
 \bprog
 ? plotinit(0,100,100);
 ? plotcolor(0, "turquoise")
 %2 = [64, 224, 208]
 ? plotbox(0, 50,50,1);
 ? plotmove(0, 50,50);
 ? plotcolor(0, 2) \\ blue
 %4 = [0, 0, 255]
 ? plotbox(0, 50,50,1);
 ? plotdraw(0);
 @eprog
