Input:
-------
-------
Output:
X: 0.000000
Y: 0.000000
Z: 0.000000
x: 0.312727
y: 0.329023
Y: 0.000000 | 0.00%
CIE 1931 Chromaticity Diagram:

Y:0.00%
-------
-------
X: 0.000000
Y: 0.000000
Z: 0.000000
x: 0.312727
y: 0.329023
Y: 0.000000 | 0.00%
---------------
CIE 1931 diagram derived from: CIE1931 - BenRG, Public domain, via Wikimedia Commons
This is the full javascript version of the old PHP one. Make sure to properly color manage the browser to enhance the color preview accuracy. Also, the viewer in XYZ and xyY input is absolute to D65, thus D50 white will look yellow. Enable "Use D50 White" to adapt into D65.
RGB to XYZ matrix transform is based on Lindbloom's Equation of RGB/XYZ Matrices. Visit there to learn more about color and math stuffs! Just like the Chromatic Adaptation matrices that I also used to plot the Display P3 and Rec.2020 colorspace in here!
Coordinate preview is an estimation, not to be used with absolute precision. White point and gamut overlay may have inaccuracies with the actual figure. Diagram best viewed in desktop. Mobile version may have alignment inaccuracies. For color representation, quoted from CIE 1931 diagram at Wikimedia: "Colors outside the sRGB triangle are clipped toward the sRGB white point, so they have more accurate hues."