How can I convert an RGB integer to the corresponding RGB tuple (R,G,B)
? Seems simple enough, but I can't find anything on google.
I know that for every RGB (r,g,b)
you have the integer n = r256^2 + g256 + b
, how can I solve the reverse in Python, IE given an n
, I need the r
,g
,b
values.