adjusted conversion of rgb values from byte to int