XYZ to xyY
Given an XYZ color whose components are in the nominal range [0.0, 1.0]:

Implementation Notes:
- Watch out for black, where X = Y = Z = 0. In that case, you may want to set x and
y to the chromaticity coordinates of your reference white.
- The output Y value is in the nominal range [0.0, 1.0].