How to change solid color to anther type in C++?

This code solved my problem.

vtkSMPVRepresentationProxy::SetScalarColoring(repre->getProxy(), "", vtkDataObject::POINT);