Calculate colour temperature in K

前端 未结 6 1015
忘掉有多难
忘掉有多难 2021-01-07 19:55

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

6条回答
  •  清酒与你
    2021-01-07 20:20

    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!

提交回复
热议问题