I am not discussing what you are doing, I am discussing what you should do. With risk of repeating myself: When using the IntegerToColorValue, one is interested in the Red, Green and Blue content of the color, not which values that happen to be stored in the Red, Green, Blue, Alpha "slots" of the color! Thus if these values do not reflect the actual color content, the result is unasable.
Martin