MATLAB: How to map colour onto a mesh grid?

colourmapmeshgrid

If I have a cubic meshgrid, made of 27 nodes, (so technically, 8 small cubes), how do I colour each of the small faces of the cube a single colour? Whenever I try using the surf command, with 'FaceColour','Flat', the whole meshgrid disappears.
It's almost meant to be like a 3D version of Tetris
Thanks!

Best Answer

Have a look on this file exchange; it might be helpful.