# puzzled with ColorData

At first let me thank, from this point as well, those that they replied to my previous queries.

From a reply I got, I obtained finally the desired graph.

lst = {10*Cos[u]*Sin[v], 3*Sin[u]*Sin[v], 2*Cos[v]};
dam = Sqrt[(1296*Cos[u]^4*
Sin[v]^4)/(900*Cos[v]^2 + 36*Cos[u]^2*Sin[v]^2 +
400*Sin[u]^2*Sin[v]^2)^2 + (3600*Cos[u]^2*
Sin[v]^2*(9*Cos[v]^2 + 4*Sin[u]^2*Sin[v]^2))/(900*Cos[v]^2 +
4*(9*Cos[u]^2 + 100*Sin[u]^2)*Sin[v]^2)^2];
colFun = Function[{u, v}, Evaluate@Hue[Rescale[dam, {0, 1}]]];
{min, max} = {0, 1};
ParametricPlot3D[lst, {u, 0, 2*Pi}, {v, 0, Pi}, Mesh -> False,
ColorFunction -> (colFun[#4, #5] &), ColorFunctionScaling -> False,
PlotRange -> All, ImageSize -> 800,
PlotLegends ->
BarLegend[{Hue, {min, max}}, ColorFunctionScaling -> True]]


Now, what I want is to check the outputs of other available color schemes.

I did the following:

coldata = ColorData["Gradients"];
col = Table[{i, coldata[[i]], ColorData[coldata[[i]]]}, {i, 51}];


So, for instance (for ColorData["BrightBands"])

{min, max} = {0, 1};
lst = {10*Cos[u]*Sin[v], 3*Sin[u]*Sin[v], 2*Cos[v]};
colFun = Function[{u, v}, Evaluate@col[[10, 3]][Rescale[dam, {0, 1}]]];
h = ParametricPlot3D[lst, {u, 0, 2*Pi}, {v, 0, Pi}, Mesh -> False,
ColorFunction -> (colFun[#4, #5] &), ColorFunctionScaling -> False,
ImageSize -> 800,
PlotLegends ->
BarLegend[{colFun, {min, max}}, ColorFunctionScaling -> True]]


The coloring of the ellipsoid is as desired, but this does not hold true for the color bar.

-

You defined your function colFun to expect two arguments. It is not clear what you want the result to look like, therefore here are three different possible solutions:

ParametricPlot3D[lst, {u, 0, 2*Pi}, {v, 0, Pi}, Mesh -> False,
ColorFunction -> (colFun[#4, #5] &), ColorFunctionScaling -> False,
ImageSize -> 800,
PlotLegends -> BarLegend[{colFun[#, #] &, {min, max}}]]


ParametricPlot3D[lst, {u, 0, 2*Pi}, {v, 0, Pi}, Mesh -> False,
ColorFunction -> (colFun[#4, #5] &), ColorFunctionScaling -> False,
ImageSize -> 800,
PlotLegends -> BarLegend[{col[[10, 3]][#] &, {min, max}}]]


ParametricPlot3D[lst, {u, 0, 2*Pi}, {v, 0, Pi}, Mesh -> False,
ColorFunction -> (colFun[#4, #5] &), ColorFunctionScaling -> False,
ImageSize -> 800,
PlotLegends -> BarLegend[{col[[10, 3]][#] &, {min, max}}, 20]]


-