Pixels have no color, period. These are just arrays of pixel values. The only drawings in X that have color interpretation are Windows (channels defined by visual recordings), images (channels defined by image formats), and GLX images (channels defined by either GLX rendering or fbconfig). Any “color” interpretation that you want to place in pixmap is a function of where these pixels will end up (or where they came from). If you are going to put them in a window, look at the Visual Window to find out what color masks are.
[edit: added GLX availability information]
source
share