> > Great explanation, even I could follow that. Of course, following it, > and figuring it out/working with it....two entirely different skillsets ;) > >
The inverse to get r, g, b from one number: /*if you lit bit twidddling*/ b = rgb>>16 g = rgb>>8 & 0xff r = rgb & 0xff /* if you like integer division/mod */ b = rgb/(256*256) g = rgb/256 % 256 r = rgb%256 The logic of the second approach works for changes n seconds to hours, minutes, seconds (60 instead of 256)
