# How can I combine the ChromaticityPlot3D with a Sphere?

Consider I have a set of 6 colors in LAB colorspace.

col={LABColor[0.5, 0.2, 0.4], LABColor[0.8,0.3,0.4],LABColor[0.3, -0.2, -0.4],
LABColor[0.2, 0.5, 0.7],LABColor[0.9, -0.5, -0.6],LABColor[0.6,-0.7, 0.4]};


I want to plot these points using ChromaticityPlot3D.

ChromaticityPlot3D[cols, "LAB", PlotStyle -> PointSize[Medium]];


Now I wish to display a sphere on top of this with a transparency.

Show[ChromaticityPlot3D[cols, "LAB", PlotStyle -> PointSize[Medium]],
Graphics3D[{Opacity[.8], Sphere[{0.5, 0., 0.}, 0.5]}]]


Here, I am getting a problem. Firstly, the sphere is too transparent even with opacity 0.8. Secondly, I want the sphere to be colored according to the colors of the color space i.e. the color at each position of the sphere will represent the corresponding color at that location in the "LAB" color space.

• something like this? – Jason B. Nov 13 '17 at 18:44
• yes (if the colors of the sphere represent the colors at the corresponding position in the LAB color space). – Majis Nov 13 '17 at 18:52

I have this:

Show[{ChromaticityPlot3D[cols, "LAB", PlotStyle -> PointSize[Medium]],
ContourPlot3D[
y^2 + z^2 + (x - 0.5)^2 == 0.25, {x, -1, 1}, {y, -1, 1}, {z, -1,
1}, ColorFunction -> Function[{x, y, z}, LABColor[x, y, z]],
ColorFunctionScaling -> False, Mesh -> False, Boxed -> True,
Axes -> True, ContourStyle -> Directive[Opacity[0.5]]]},
BoxRatios -> {1/2.4, 1, 1}, ImageSize -> Large,
SphericalRegion -> True] • Setting PlotPoints ->100 on the contour plot improves the result – Jason B. Nov 13 '17 at 19:23
• Yes !, thnx @JasonB. The plot even looks better with PointSize[0.01] – José Antonio Díaz Navas Nov 13 '17 at 19:28

Alternatively, discretize a sphere for coloring purposes:

cols = {LABColor[0.5, 0.2, 0.4], LABColor[0.8, 0.3, 0.4], LABColor[0.3, -0.2, -0.4],
LABColor[0.2, 0.5, 0.7], LABColor[0.9, -0.5, -0.6], LABColor[0.6, -0.7, 0.4]};
sph = DiscretizeRegion[Sphere[{1/2, 0, 0}, 1/2], MaxCellMeasure -> {1 -> 0.05}];

Show[ChromaticityPlot3D[cols, "LAB", PlotStyle -> AbsolutePointSize],
Graphics3D[With[{pts = MeshCoordinates[sph]},
GraphicsComplex[pts, {Directive[Opacity[0.8], EdgeForm[]],
MeshCells[sph, 2]},
VertexColors -> (LABColor @@@ pts)]]],
BoxRatios -> Automatic] 