Xlib - Mapping Pixel Values to RGB Colors

Hi everyone...
I'm working with XLib and I want to find out the pixel value of a particular point on screen and then map it to RGB values. I used XGetImage and XGetPixel to get the pixel value, but how do I get the RGB values of the pixel?
I went through a few XLib manuals, there seems to be no way. Any solution?

I'm thinking of that,too.

I found XQueryColor function. below article is good!
Screen grab with X11

I succeed by XQueryColor.