Optimized Function

Optimized setColorsFromSmall to remove redundant bitwise usage