REQUEST ARGUMENTS

REPLY FIELDS

The type of this reply, in this
case XCB_ALLOC_COLOR. This field is also present in
the xcb_generic_reply_t and can be used to tell
replies apart from each other.

sequence

The sequence number of the last request processed by the
X11 server.

length

The length of the reply, in words (a word is 4
bytes).

red

TODO: NOT YET DOCUMENTED.

green

TODO: NOT YET DOCUMENTED.

blue

TODO: NOT YET DOCUMENTED.

pixel

TODO: NOT YET DOCUMENTED.

DESCRIPTION

Allocates a
read-only colormap entry corresponding to the closest RGB
value supported by the hardware. If you are using TrueColor,
you can take a shortcut and directly calculate the color
pixel value to avoid the round trip. But, for example, on
16-bit color setups (VNC), you can easily get the closest
supported RGB value to the RGB value you are specifying.

RETURN VALUE

Returns an
xcb_alloc_color_cookie_t. Errors have to be handled
when calling the reply function
xcb_alloc_color_reply.

If you want to
handle errors in the event loop instead, use
xcb_alloc_color_unchecked. See xcb-requests(3)
for details.