Making a multi color grid material w/o Texture

Hey,

im a beginner to materials and i need help. To make it clear and to simplify things i made a simple triangular pyramid mesh.

What i want now is to be able to paint all 4 sides of the mesh separately in the editor with flat colors.

Right now im using a simple grid texture and for the UV i put each face of the mesh in each tile

117763-palette4uv.png

Now if i want another color for one of the 4 sides i need to repaint the texture in my painting app and reimport it.

Better would be to get rid of the texture and do this all inside of the material.
I somehow need to get every tile and paint it with a base color, but i dont know how.

The pyramid and texture are only dummies, the actual mesh will have more uv islands and the grid will have more than 4 tiles.

Can someone help?