1XStoreColors(3)                 XLIB FUNCTIONS                 XStoreColors(3)
2
3
4

NAME

6       XStoreColors, XStoreColor, XStoreNamedColor - set colors
7

SYNTAX

9       int  XStoreColors(Display  *display, Colormap colormap, XColor color[],
10              int ncolors);
11
12       int XStoreColor(Display *display, Colormap colormap, XColor *color);
13
14       int XStoreNamedColor(Display *display, Colormap colormap, _Xconst  char
15              *color, unsigned long pixel, int flags);
16

ARGUMENTS

18       color     Specifies  the  pixel and RGB values or the color name string
19                 (for example, red).
20
21       color     Specifies an array  of  color  definition  structures  to  be
22                 stored.
23
24       colormap  Specifies the colormap.
25
26       display   Specifies the connection to the X server.
27
28       flags     Specifies which red, green, and blue components are set.
29
30       ncolors   Specifies  the number of XColor structures in the color defi‐
31                 nition array.
32
33       pixel     Specifies the entry in the colormap.
34

DESCRIPTION

36       The XStoreColors function changes the colormap  entries  of  the  pixel
37       values  specified  in  the pixel members of the XColor structures.  You
38       specify which color components are to be changed by setting DoRed,  Do‐
39       Green,  and/or DoBlue in the flags member of the XColor structures.  If
40       the colormap is an installed map for its screen, the changes are  visi‐
41       ble immediately.  XStoreColors changes the specified pixels if they are
42       allocated writable in the colormap by any client, even if one  or  more
43       pixels  generates  an error.  If a specified pixel is not a valid index
44       into the colormap, a BadValue error results.  If a specified pixel  ei‐
45       ther  is  unallocated  or is allocated read-only, a BadAccess error re‐
46       sults.  If more than one pixel is in error, the one that gets  reported
47       is arbitrary.
48
49       XStoreColors can generate BadAccess, BadColor, and BadValue errors.
50
51       The  XStoreColor function changes the colormap entry of the pixel value
52       specified in the pixel member of the XColor structure.   You  specified
53       this  value  in  the  pixel member of the XColor structure.  This pixel
54       value must be a read/write cell and a valid index  into  the  colormap.
55       If a specified pixel is not a valid index into the colormap, a BadValue
56       error results.  XStoreColor also changes the red,  green,  and/or  blue
57       color components.  You specify which color components are to be changed
58       by setting DoRed, DoGreen, and/or DoBlue in the  flags  member  of  the
59       XColor  structure.  If the colormap is an installed map for its screen,
60       the changes are visible immediately.
61
62       XStoreColor can generate BadAccess, BadColor, and BadValue errors.
63
64       The XStoreNamedColor function looks up the named color with respect  to
65       the  screen  associated  with the colormap and stores the result in the
66       specified colormap.  The pixel argument determines  the  entry  in  the
67       colormap.   The  flags argument determines which of the red, green, and
68       blue components are set.  You can set this member to the bitwise inclu‐
69       sive  OR  of the bits DoRed, DoGreen, and DoBlue.  If the color name is
70       not in the Host Portable Character Encoding, the result is  implementa‐
71       tion-dependent.  Use of uppercase or lowercase does not matter.  If the
72       specified pixel is not a valid index into the colormap, a BadValue  er‐
73       ror  results.  If the specified pixel either is unallocated or is allo‐
74       cated read-only, a BadAccess error results.
75
76       XStoreNamedColor can generate BadAccess, BadColor,  BadName,  and  Bad‐
77       Value errors.
78

DIAGNOSTICS

80       BadAccess A  client attempted to free a color map entry that it did not
81                 already allocate.
82
83       BadAccess A client attempted to store into a read-only color map entry.
84
85       BadColor  A value for a Colormap argument does not name a defined  Col‐
86                 ormap.
87
88       BadName   A font or color of the specified name does not exist.
89
90       BadValue  Some numeric value falls outside the range of values accepted
91                 by the request.  Unless a specific range is specified for  an
92                 argument,  the  full  range defined by the argument's type is
93                 accepted.  Any argument defined as a set of alternatives  can
94                 generate this error.
95

SEE ALSO

97       XAllocColor(3), XCreateColormap(3), XQueryColor(3)
98       Xlib - C Language X Interface
99
100
101
102X Version 11                     libX11 1.7.2                  XStoreColors(3)
Impressum