I have some numbers that I want to interpret as RGB color tuples. The number represents the color like it were in base 256; i.e., the "65536s" digit represents the red component, the "256s" digit represents the green component, and the ones digit represents the blue component.
I wrote some complex code to do this, with a lot of special cases. Do I need my own code for this task? What is the simplest and most direct way to get this result?