So FFFFFF would be converted to 1023,1023,1023.
FF = 255. FF = 255. FF = 255. Why are you trying to stretch 255 to 1023?