'\"macro stdmacro
.if n .pH g3x11.XStColors @(#)XStColors	40.3 of 1/19/90
.ds tk X Toolkit
.ds xT X Toolkit Intrinsics \- C Language Interface
.ds xI Intrinsics
.ds xW Athena X Widgets \- C Language X Toolkit Interface
.ds xL Xlib \- C Language X Interface
.ds xC Inter-Client Communication Conventions Manual
.ds Rn 3
.ds Vn 2.2
.hw XtMake-Geometry-Request XtQuery-Geometry wid-get
.na
.de Ds
.nf
.\\$1D \\$2 \\$1
.ft 1
.ps \\n(PS
.\".if \\n(VS>=40 .vs \\n(VSu
.\".if \\n(VS<=39 .vs \\n(VSp
..
.de De
.ce 0
.if \\n(BD .DF
.nr BD 0
.in \\n(OIu
.if \\n(TM .ls 2
.sp \\n(DDu
.fi
..
.de FD
.LP
.KS
.TA .5i 3i
.ta .5i 3i
.nf
..
.de FN
.fi
.KE
.LP
..
.de IN		\" send an index entry to the stderr
.tm \\n%:\\$1:\\$2:\\$3
..
.de C{
.KS
.nf
.D
.\"
.\"	choose appropriate monospace font
.\"	the imagen conditional, 480,
.\"	may be changed to L if LB is too
.\"	heavy for your eyes...
.\"
.ie "\\*(.T"480" .ft L
.el .ie "\\*(.T"300" .ft L
.el .ie "\\*(.T"202" .ft PO
.el .ie "\\*(.T"aps" .ft CW
.el .ft R
.ps \\n(PS
.ie \\n(VS>40 .vs \\n(VSu
.el .vs \\n(VSp
..
.de C}
.DE
.R
..
.de Pn
.ie t \\$1\fB\^\\$2\^\fR\\$3
.el \\$1\fI\^\\$2\^\fP\\$3
..
.de PN
.ie t \fB\^\\$1\^\fR\\$2
.el \fI\^\\$1\^\fP\\$2
..
.de NT
.ne 7
.ds NO Note
.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
.ie n .sp
.el .sp 10p
.TB
.ce
\\*(NO
.ie n .sp
.el .sp 5p
.if '\\$1'C' .ce 99
.if '\\$2'C' .ce 99
.in +5n
.ll -5n
.R
..
.		\" Note End -- doug kraft 3/85
.de NE
.ce 0
.in -5n
.ll +5n
.ie n .sp
.el .sp 10p
..
.ny0
.nr X
.if \nX=0 .ds x} XStoreColors 3X11 "9/1/88" "XWIN 3.0" "\&"
.if \nX=1 .ds x} XStoreColors 3X11 "9/1/88" "XWIN 3.0"
.if \nX=2 .ds x} XStoreColors 3X11 "" "\&"
.if \nX=3 .ds x} XStoreColors "" "" "\&"
.TH \*(x}
.SH NAME
XStoreColors, XStoreColor, XStoreNamedColor \- set colors
.SH SYNTAX
.\" $Header: XStoreColors.f,v 1.2 88/05/09 07:41:37 mento Exp $
XStoreColors\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIcolor\fP\^, \fIncolors\fP\^)
.br
      Display *\fIdisplay\fP\^;
.br
      Colormap \fIcolormap\fP\^;
.br
      XColor \fIcolor\fP\^[\^]\^;
.br
      int \fIncolors\fP\^;
.LP
.\" $Header: XStoreColor.f,v 1.2 88/05/09 07:46:50 mento Exp $
XStoreColor\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIcolor\fP\^)
.br
      Display *\fIdisplay\fP\^;
.br
      Colormap \fIcolormap\fP\^;
.br
      XColor *\fIcolor\fP\^;
.LP
.\" $Header: XStoreNColor.f,v 1.2 88/05/09 08:40:00 mento Exp $
XStoreNamedColor\^(\^\fIdisplay\fP, \fIcolormap\fP\^, \fIcolor\fP\^, \fIpixel\fP\^, \fIflags\fP\^)
.br
      Display *\fIdisplay\fP\^;
.br
      Colormap \fIcolormap\fP\^;
.br
      char *\^\fIcolor\fP\^;
.br
      unsigned long \fIpixel\fP\^;
.br
      int \fIflags\fP\^;
.SH ARGUMENTS
.ds Co pixel and RGB values or the color name string (for example, red)
.\" $Header: color_gen.a,v 1.2 88/08/04 11:07:59 mento Exp $
.IP \fIcolor\fP 1i
Specifies the \*(Co.
.\" $Header: defs.a,v 1.1 88/02/26 10:06:27 mento Exp $
.IP \fIcolor\fP 1i
Specifies an array of color definition structures to be stored.
.\" $Header: cmap.a,v 1.2 88/05/09 06:39:13 mento Exp $
.IP \fIcolormap\fP 1i
Specifies the colormap.
.\" $Header: display.a,v 1.1 88/02/26 10:26:29 mento Exp $
.IP \fIdisplay\fP 1i
Specifies the connection to the X\s-2WIN\s+2 server.
.\" $Header: flags.a,v 1.2 88/04/05 17:24:55 mento Exp $
.IP \fIflags\fP 1i
Specifies which red, green, and blue components are set.
.\" $Header: ncolors.a,v 1.1 88/02/26 10:29:17 mento Exp $
.IP \fIncolors\fP 1i
.\"Specifies the number of color definition structures. 
Specifies the number of 
.PN XColor
structures in the color definition array.
.\" $Header: pixel.a,v 1.2 88/05/09 08:44:04 mento Exp $
.IP \fIpixel\fP 1i
Specifies the entry in the colormap. 
.SH DESCRIPTION
.\" $Header: XStoreColors.d,v 1.3 88/06/11 07:53:50 mento Exp $
The
.PN XStoreColors
function changes the colormap entries of the pixel values
specified in the pixel members of the
.PN XColor
structures.
You specify which color components are to be changed by setting 
.PN DoRed ,
.PN DoGreen ,
and/or
.PN DoBlue
in the flags member of the
.PN XColor
structures.
If the colormap is an installed map for its screen, the
changes are visible immediately.
.PN XStoreColors 
changes the specified pixels if they are allocated writable in the colormap 
by any client, even if one or more pixels generates an error.
If a specified pixel is not a valid index into the colormap, a
.PN BadValue
error results.
If a specified pixel either is unallocated or is allocated read-only, a
.PN BadAccess
error results.
If more than one pixel is in error, 
the one that gets reported is arbitrary.
.LP
.ds fd .PN XStoreColors
\*(fd
can generate
.PN BadAccess ,
.PN BadColor ,
and
.PN BadValue 
errors.
.LP
.\" $Header: XStoreColor.d,v 1.3 88/08/18 07:39:08 mento Exp $
The
.PN XStoreColor
function changes the colormap entry of the pixel value specified in the
pixel member of the
.PN XColor
structure.
You specified this value in the
pixel member of the
.PN XColor
structure.
This pixel value must be a read/write cell and a valid index into the colormap.
If a specified pixel is not a valid index into the colormap,
a
.PN BadValue
error results.
.PN XStoreColor
also changes the red, green, and/or blue color components.
You specify which color components are to be changed by setting
.PN DoRed ,
.PN DoGreen ,
and/or
.PN DoBlue
in the flags member of the
.PN XColor
structure.
If the colormap is an installed map for its screen, 
the changes are visible immediately.
.LP
.ds fd .PN XStoreColor
\*(fd
can generate
.PN BadAccess ,
.PN BadColor ,
and 
.PN BadValue 
errors.
.LP
.\" $Header: XStoreNColor.d,v 1.3 88/06/11 07:53:51 mento Exp $
The
.PN XStoreNamedColor
function looks up the named color with respect to the screen associated with
the colormap and stores the result in the specified colormap.
The pixel argument determines the entry in the colormap.
The flags argument determines which of the red, green, and blue components 
are set. 
You can set this member to the
bitwise inclusive OR of the bits 
.PN DoRed , 
.PN DoGreen , 
and 
.PN DoBlue .
If the specified pixel is not a valid index into the colormap, a
.PN BadValue
error results.
If the specified pixel either is unallocated or is allocated read-only, a
.PN BadAccess
error results.
You should use the ISO Latin-1 encoding; 
uppercase and lowercase do not matter.
.LP
.ds fd .PN XStoreNamedColor
\*(fd
can generate
.PN BadAccess ,
.PN BadColor ,
.PN BadName ,
and
.PN BadValue 
errors.
.SH DIAGNOSTICS
.\" $Header: badaccess2.e,v 1.1 87/09/04 08:22:45 mento Exp $
.TP 1i
.PN BadAccess
A client attempted
to free a color map entry that it did not already allocate.
.\" $Header: badaccess3.e,v 1.1 87/09/04 08:22:50 mento Exp $
.TP 1i
.PN BadAccess
A client attempted
to store into a read-only color map entry.
.\" $Header: badcolor.e,v 1.1 87/09/04 08:22:57 mento Exp $
.TP 1i
.PN BadColor
A value for a Colormap argument does not name a defined Colormap.
.\" $Header: badname.e,v 1.1 87/09/04 08:23:14 mento Exp $
.TP 1i
.PN BadName
A font or color of the specified name does not exist.
.\" $Header: badvalue.e,v 1.1 87/09/04 08:23:19 mento Exp $
.TP 1i
.PN BadValue
Some numeric value falls outside the range of values accepted by the request.
Unless a specific range is specified for an argument, the full range defined
by the argument's type is accepted.  Any argument defined as a set of
alternatives can generate this error.
.SH "SEE ALSO"
XAllocColor(3X11),
.br
XCreateColormap(3X11),
.br
XQueryColor(3X11)
.br
\fI\*(xL\fP
