{m0, m1, m2, m3, m4, m5, m6, m7} = {4, 3, 2, 3, 6, 2, 6, 4};
r = Sin[m0*phi]^m1 + Cos[m2*phi]^m3 + Sin[m4*theta]^m5 + Cos[m6*theta]^m7;
g = ParametricPlot3D[{r*Sin[phi]*Cos[theta], r*Cos[phi],
r*Sin[phi]*Sin[theta]}, {phi, 0, Pi}, {theta, 0, 2 Pi},
ColorFunction -> (Blend[{Red, Yellow, Green, Cyan, Blue}, #] &),
Mesh -> None, Boxed -> False, Axes -> 0];
g /. Polygon -> Line
gives this:

The colour information is gone.
I want to get the output below:

How can I get it?

