Okay, so I have a 16 bit positive value (0-65535) representing a color in 565 RGB notation, that is 5 bits for red, 6 bits for green, and 5 bits for blue.
I need to separate the red, green, and blue values out so I may give them to a function that takes red, green, and blue values separately.
So, thinking back to C, I figured I could use bitshifts. But when I do, it appears the bits wrap around. So is this even possible in Python?
I need to separate the red, green, and blue values out so I may give them to a function that takes red, green, and blue values separately.
So, thinking back to C, I figured I could use bitshifts. But when I do, it appears the bits wrap around. So is this even possible in Python?
Comment