This is commonly done by projecting the 3D color space onto the plane X+Y+Z=1, yielding a CIE chromaticity diagram.
The projection is defined as:
Giving one of the following chromaticity diagram.