Coloring polygons with random color in QGIS
Use a Categorized style on the layer.
In QGIS 2.8.1 version, Right click on the layer. Go to Layer Properties. Clcik Styles Tab. Select drop down value Categorized. Use Random colors from Color Ramp drop down list.