I'm not sure how to get the red, green, and blue bits from the long data type that is returned from the getpixel routine. Could anybody show me how to do this?

A=getpixel(5,5,me.hdc)

What is a's red value (0-255)?
What is a's green value (0-255)?
What is a's blue value (0-255)?