I have written a lib for working with colours and stuck trying to calculate Tc(k)
. From what I have read working in the CIE 1931 XYZ
colour space i
Based on the Wikipedia article I entered the approximated formula for Color Temperature
calculation into Excel as
=(-449*((R1-0,332)/(S1-0,1858))^3)+(3525*((R1-0,332)/(S1-0,1858))^2)-(6823,3*((R1-0,332)/(S1-0,1858)))+(5520,33)
R1 is color space x coordinate from 0 to 1
S1 is color space y coordinate from 0 to 1
Works fine!