Showing results for 
Search instead for 
Did you mean: 

Setting up a CIE chromaticity diagram in LabView

Hi out there!
Does anybody know, how to create a CIE1931 chromaticity diagram in LabView, and to highlight points in this diagram for known x,y coordinates?
0 Kudos
Message 1 of 12
Hi again,
I just had an idea, how to solve my problem.
The result is shown in the vi's above: sets up an 200x200 pixel diagram.
in you can set up a matrix (depending on your color space) an then calculate upon x and y values (i.e. xyY) the correspondig RGB values.
Have fun!
Download All
Message 2 of 12
Sorry, of course it is NOT the whole CIE-Chromaticity diagrame, but only the RGB Gamut inside the CIE diagram.
0 Kudos
Message 3 of 12

I have posted up a little example for converting RGB to CIE (XYZ) using “IMAQ RGBToColor2” VI which is in the color utilities pallet which is part of the IMAQ vision package.



Attachment RGB to CIE(XYZ) (28 kb)



i hope it can help you




0 Kudos
Message 4 of 12

Good Day to all,


Hello there masters of LabVIEW! I'm Dennis from the Philippines and quite new here in NI Discussion Forums and actually my first post here.


I would like to ask help also regarding CIE chromaticity diagram. However, my problem comes from much deeper root. Here are the details:


I am currently using a Blue Wave Spectrometer - a low-cost fiber optic solution from Stellarnet. I actually bought these instrument to be able to measure Dominant Wavelength of LED's. The software package (executable file made from unknown programming language) which comes with my spectrometer is using 1931 CIE Chromaticity Diagram to measure this. But this application is not useful to me since I am coding my system through LabVIEW.


I ask my supplier if they can provide me a LabVEW version of this application (development code) but it seems that they have confidentiality problem about it and it seems that they will not give it to me.


But previously, they had provided us the basic spectrometer driver using LabVIEW. However, the VI only outputs Irradiance value (W/m2) vs. Wavelength. 


Is there someone who know how to convert/produce this value to x,y, z values that will be used to plot the Dominant Wavelength on CIE Chromaticity Diagram?


Thank you very much!





0 Kudos
Message 5 of 12

Hi  Denshie,

Try using the library or the API from the vendor and call them into LabVIEW.

I have computed some of the basic parameters using the API`s provided by the vendor .

I have used a USB4000 from ocean optics.


Also check this link

Hope this gives you some basic info on computations of various parameters on optical measurements.




Message 6 of 12

Hello Sundar,


Thanks for your reply.


I'm not sure if my vendor will be generous enough to give me their API. But I will try to communicate it to them.


But I alsso visited the link that you gave me. I think you also encounter my problems previously and its good that you already solved yours with the help of the community. I hope I can solve mine to. Right now, I'm still studying how can I apply the VI that was provided on the forum.


Thank you very much.





0 Kudos
Message 7 of 12

Hi Dennis,

This VI posted gives a general idea of the working of the algorithm.

You could build over it to customize to your need. 

Do let know if you have any clarifications , would be glad to help you.



0 Kudos
Message 8 of 12

You could also find the API`s required forBluewace Spectrometer from Stellarnet from below Link.

under downloads section , a whole of drivers are provided including LabVIEW .

when the hardware is purchased from vendor , You might get some drivers packaged which have 

the passcode to the API`s. Thats how i recieved them.



0 Kudos
Message 9 of 12

Hello Sundar,


Thank you again for the reply.


I think I will be able to solve my problems sooner. Just a minute ago, I was able to find a solution in converting xy values to Dominant Wavelength. And through the link you had given me last time, I was able to get xy values from irradiance values (Watt vs nm) coming from my spectrometer. I just have to combine those VI later.


Thank you very much again. Have a nice day!





0 Kudos
Message 10 of 12