
XYZ_to_plotting_colourspace(XYZ, illuminant), axis=-1) Standard observer colour matching functions used for Path of points used to clip the *Chromaticity Diagram* colours. Opacity of the *Chromaticity Diagram* colours.ĭiagram_clipping_path : array_like, optional Plots the *Chromaticity Diagram* colours according to given method. The Python code for drawing the colours and bounding them with the spectral locus is as follows: plot_chromaticity_diagram_colours(Ĭmfs='CIE 1931 2 Degree Standard Observer', With that in mind, generating the diagram can be done by generating a regularly spaced 2D grid of samples in domain and apply the conversion path to them.Īs you found out, no display device is capable of representing the visible spectrum, so you will be limited by its colorimetry boundaries.Ĭolour implements the three common Chromaticity Diagrams:ĬIE 1931 Chromaticity Diagram CIE 1960 UCS Chromaticity Diagram CIE 1976 UCS Chromaticity Diagram The conversion path from CIE xyY to a given RGB colourspace, e.g. Effectively I realized that the "white point" actually is a gray point (several diagrams seem to have that wrong), and it seems that Illuminant C is the correct one, too, so this is my final version so far. However when you use normalized data the dark colors become bright, and the brighter colors become darker. In case it's OK, how would I fill the "non-spectral triangle" outlines by both ends of the spectral line and the white-point? Trying that I found out that the ends of the spectral line practically represent black, so the triangle came out much more black than purple, and opposed to all diagrams I've seen before, there's a discontinuity where the non-spectral colors are ( Example Image)Īs an experiment, I cut off the end of the spectrum to 435-645nm, and the transition from spectral to non-spectral colors is rather smooth then. Is it OK to put the C white at its position and use Gouraud-Shaded Triangle Meshes to interpolate the area between two points on the spectral line and that white point ( Example Image connecting 470nm with 500nm and with Illuminant C)? That seems to be OK. Another part of the problem is filling in the correct colors (I'm aware that no existing computer display device can actually present them): But how would that function f look like?Īctually I wanted to construct a CIE L uv* diagram, but when knowing the (x, y) vectors for CIE Yxy, I could easily convert those to (u*, v*), right?ĭrawing the outline (spectral line) is one part of the problem.

I'm assuming there is some parametric function f(wavelength) giving a vector (x, y) for each f. If I wanted to construct the diagram myself from some published measurement values, how would I do it? It seems most references showing a CIE Yxy diagram can be reduced to very few (one?) sources.
