inverse rgb() function

Discuss Lemur and share techniques.
Post Reply
lucasparis
Newbie
Posts: 30
Joined: 23 Dec 2011 20:15

inverse rgb() function

Post by lucasparis »

Hi,

I'm would like to implement a function that would do the inverse of rgb, that is take a a single value from 0 to 8355711 and return 3 values between 0 and 1.

I'm storing colors in a led matrix and need to get the colors that have already been added and add new ones, like add only green.

i'll try figuring the math out since I have the formula for the rgb function ((R*127 x 2^16) + (G*127 x 2^8) + B*127) I need to do the inverse (getting pen and paper out)
Post Reply