Shader: Random cubic color
In order to have each 'square' to be a consistent color you need to change the coordinates fed into the Noise texture to change in discrete steps. This can be achieved using a Modulo function. The Modulo node effectively divides the input value by the specified amount and outputs the remainder. By subtracting the remainder we can produce a 'stepped' value. Since this value does not change over the specified range (in this case 1/7 - to match the scale of the 'squares' texture of 7) the result of the Noise will be constant over that range, resulting in a constant color.

 

Note that I also added a Mapping node to offset the coordinates slightly - so that the squares correspond to all faces.