Hey.. I have already figured it out..
R = x * 1
G = x * 256
B = x * 65536

Now.. just get the value and count backwards..

sorry for your time..