# Points in CIE Lab color space

The following points are Lab values (CIELAB color space)

points={{46.76, 34.51, 17.08}, {43.51, 34.83, 15.7}, {45.49, 32.92, 15.24}}

what I would like to do is a) represent them in 3D b) give each point the color it represents and c) label each point with a text, let us say {"one","two","three"}. My starting point is an adaptation from the documentation:

Graphics3D[{LABColor[#], Sphere[#, .2]} & /@ points, Axes -> True, AxesLabel -> {"L", "a", "b"}, BoxRatios -> Automatic]

However, I do not get the colors right. thanks for the help.

• Don't you need divide points by 255? Aug 17, 2018 at 11:47
• @OkkesDulgerci where does 255 come from? Shouldn't it be 100? (I am not sure but that is what documentation suggests).
– Kuba
Aug 17, 2018 at 12:24
• @Kuba 255 for RGBColor After I posted my answer I started reading documentation it seems you are right. Aug 17, 2018 at 12:32

According to documentation here you need to divide values by 100

points = {{46.76, 34.51, 17.08}, {43.51, 34.83, 15.7}, {45.49, 32.92,
15.24}};
Graphics3D[{LABColor[#/100], Sphere[#, 0.2]} & /@ points,
Axes -> True, AxesLabel -> {"L", "a", "b"}]

According to here formula for converting to color is

points ={{46.76, 34.51, 17.08}, {43.51, 34.83, 15.7}, {45.49, 32.92, 15.24}};
{L, a, b} = Transpose@points;
{L = L/100, a = (a + 86.185)/184.439, b = (b + 107.863)/202.345};
pts = Transpose@{L, a, b};
Graphics3D[{LABColor[#], Sphere[#, 0.005]} & /@ pts, Axes -> True,
AxesLabel -> {"L", "a", "b"}]

Or this kind of converting

{L, a, b} = Transpose@points;
{L = L/100, a = (a + 128)/255, b = (b + 128)/255};
pts = Transpose@{L, a, b};
Graphics3D[{LABColor[#], Sphere[#, 0.005]} & /@ pts, Axes -> True,
AxesLabel -> {"L", "a", "b"}]

• indeed points contain CIELab values, so one should only divide by 100 for LABColor. Right? Why 100 for L and 255 for a and b? Aug 17, 2018 at 13:40