Should you ever want to do this slightly obscure thing, here’s how!
- Get Meshlab (Don’t worry, it’s free!)
- Have ready the vertex coloured model and a copy that has been UV mapped
- Import both into Meshlab
- Filters > Texture > Transfer Vertex Attributes to Texture (between 2 meshes)
- Select the vertex coloured model as the source and the UV mapped model as the Target. Set the resolution you want and check Overwrite Target Mesh Texture (Meshlab sometimes seems unhappy if you don’t)
- Click apply
After meshlab has complained a bit the texture file should appear in the same directory as the model file.