clamped isn't necessary
store values as a Uint32 instead of 4 Uint8s
while we are at it, replace nested for loops with a while loop
Add palette control