Working with led strips from my end I use function Color(0-255, 0-255, 0-255) for rgb, the function encodes to 24-bit color and is written below
Def Color(red, green, blue, white = 0):
"""Convert the provided red, green, blue color to a 24-bit color value.
Each color component should be a value 0-255 where 0 is the lowest intensity
and 255 is the highest intensity."""
Return (white << 24) | (red << 16) | (green << 8) | blue
Later on I retrieve this 24-bit color with another function, I need to decode it back into (0-255, 0-255, 0-255) I have no clue how to do this...
I used a print function to see what's happening and
a pixel (red 0, green 255, blue 0) returns 16711680
a pixel (red 255, green 0, blue 0) returns 65280
a pixel (red 0, green 0, blue 255) returns 255 which makes sense to me
How can I decode this efficiently/quickly (running on rpi zero w) must be in python