Status XAllocColorPlanes(display, colormap, contig, pixels_return, ncolors, nreds, ngreens, 
                           nblues, rmask_return, gmask_return, bmask_return)
      Display *display;
      Colormap colormap;
      Bool contig;
      unsigned long pixels_return[];
      int ncolors;
      int nreds, ngreens, nblues;
      unsigned long *rmask_return, *gmask_return, *bmask_return;
| display | Specifies the connection to the X server. | 
| colormap | Specifies the colormap. | 
| contig | Specifies a Boolean value that indicates whether the planes must be contiguous. | 
| pixels_return | Returns an array of pixel values. XAllocColorPlanes() returns the pixel values in this array. | 
| ncolors | Specifies the number of pixel values that are to be returned in the pixels_return array. | 
|  nreds ngreens nblues  | Specify the number of red, green, and blue planes. The value you pass must be nonnegative. | 
| rmask_return gmask_return bmask_return | Return bit masks for the red, green, and blue planes. | 
XAllocColorPlanes() can generate BadColor and BadValue errors.
| BadColor | A value for a Colormap argument does not name a defined Colormap. | 
| 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. |