When the rgb is registered as a float, request the value as a float to avoid manipulation.
Also, mask out any extra information that may be stored in the upper 8 bits.