XYZ to Luv

This conversion requires a reference white $(X_r, Y_r, Z_r)$.

$$L = \cases{ 116 \sqrt[3]{y_r} - 16 & \text{if }y_r \gt \epsilon \\ \kappa y_r & \text{otherwise} }$$ $$u = 13 L (u' - u_r')$$ $$v = 13 L (v' - v_r')$$

where

$$y_r = {{Y} \over {Y_r}}$$ $$u' = {{4X} \over {X + 15Y + 3Z}}$$ $$v' = {{9Y} \over {X + 15Y + 3Z}}$$ $$u_r' = {{4X_r} \over {X_r + 15Y_r + 3Z_r}}$$ $$v_r' = {{9Y_r} \over {X_r + 15Y_r + 3Z_r}}$$ $$\epsilon = \cases{ {0.008856} & \text{Actual CIE standard} \\ {216 / 24389} & \text{Intent of the CIE standard} }$$ $$\kappa = \cases{ {903.3} & \text{Actual CIE standard} \\ {24389 / 27} & \text{Intent of the CIE standard} }$$

Implementation Notes:

  1. For an explanation of $\epsilon$ and $\kappa$ click here.