I’m writing a project in xlib and have a problem concerning the colors.I use unsigned long type variables for storing the color values.does anybody know how can i take the red green and blue values of each color?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Are you saying that the 24 bits of color (8 for each color component) are stored together in one 32 bit integer? If that’s the case you can obtain the values using the logical AND operation to zero the other bits.
Let’s say you start with