[][src]Function xcb::ffi::xproto::xcb_alloc_color

pub unsafe extern "C" fn xcb_alloc_color(
    c: *mut xcb_connection_t,
    cmap: xcb_colormap_t,
    red: u16,
    green: u16,
    blue: u16
) -> xcb_alloc_color_cookie_t

Allocate a color

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.