Function xcb::xproto::alloc_color[][src]

pub fn alloc_color<'a>(
    c: &'a Connection,
    cmap: Colormap,
    red: u16,
    green: u16,
    blue: u16
) -> AllocColorCookie<'a>

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.

parameters: