colour-science / colour

Colour Science for Python
https://www.colour-science.org
BSD 3-Clause "New" or "Revised" License
2.1k stars 260 forks source link

colour.dominant_wavelength(xy, xy_n) #1248

Closed fabio-ric-silva closed 7 months ago

fabio-ric-silva commented 7 months ago

Question

Dears; I have read some documentation, but couldn't find how to get the value of xy_n. My sensor reads RGB, and I'm able of getting the XYZ value, and converting for CIA XY.

But, how can I get the xy_n value?

Thanks in advance!

Sincerely;

tjdcs commented 7 months ago

Hi @fabio-ric-silva

xy_n is the "white point" or the point in x,y space that has no dominant wavelength and it is selected by you, the user, based on your application.

In CIE Colorimetry and in the traditional definition of dominant wavelength + purity, the equal energy spectrum is defined to be the reference point. Under this assumption / standard the xy_n point is (1/3, 1/3)

However, in other applications and in research there may be other useful choices like D65, 7,000K or 15,000K. Unless you know you are specifically working in those fields and advanced research you should use the CIE standard which I believe is the default value for this function.

Hope this helps!