XYZ and CIE L*a*b*
W is a 1x3 reference white vector of a standard illuminant. The κ and ϵ constants are given by CIE standards used to calculate values above or below the junction point of the companding functions below. Before 2004, approximations were used such that κ = 903.3 and ϵ = 0.008856.
ϵκ=116243=121163 XYZ to L*a*b*
X′Y′Z′f(n)L∗a∗b∗L∗=WXX=WYY=WZZ={n′31116κ⋅n′+16 if n>ϵ otherwise =116⋅f(Y)−16=500⋅(f(X)−f(Y))=200⋅(f(Y)−f(Z))=min(max(L∗,0)1) L*a*b* to XYZ
L′a′b′X′Y′Z′XYZ=116L∗+16=500a∗+L′=L′−200b∗={a′3κ116⋅a′−16 if a′3>ϵ otherwise ={L′3L∗⋅κ if L∗>κ⋅ϵ otherwise ={b′3κ116⋅b′−16 if b′3>ϵ otherwise =X′⋅WX=Y′⋅WY=Z′⋅WZ