assignPixels function

Assign a 2D matrix of pixels to specified colors