Shader color to texture

I have a 3D object with a shader attached in order to visualize some properties in my mesh. The shader is responsible for coloring vertices of the mesh. Is there any way to convert the color of the shader to a mesh texture. For me the ideal result could be to save a .png file. Thanks!!!