XYZ and CIE L*u*v*
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*u*v*
Y′du′v′L∗ur′vr′u∗v∗L∗=WYY=X+15Y+3Z={0d4X if d=0 otherwise ={0d9Y if d=0 otherwise ={116⋅Y′31Y′⋅κ if Y′>ϵ otherwise =WX+15⋅WY+3⋅WZ4⋅WY=WX+15⋅WY+3⋅WZ9⋅WY=L∗⋅(u′−ur′)=L∗⋅(v′−vr′)=min(max(L∗,0)1) L*a*b* to XYZ
Yu0v0abcdXZ={(116L∗+16)1/3κL∗ if L∗>κ⋅ϵ otherwise =WX+15⋅WY+3⋅WZ4⋅WX=WX+15⋅WY+3⋅WZ9⋅WX=31⋅u∗+13⋅L∗⋅u052⋅L∗−1=−5Y=−31=Y⋅v∗+13⋅L∗⋅v039⋅L∗−5=a−cd−b=X⋅a+b