The Color Pro package includes a few functions for calculating and testing color temperature. These are defined as extension methods in the static class Temperature.

🌡️ CCT

Calculates the CCT temperature of the color in Kelvin.

// Color temperature
float temperature = color.CCT();
string temperature = color.CCTString();

// Illuminant temperature
Illuminant illuminant = Illuminant.D65;
float temperature = illuminant.CCT();
string temperature = illuminant.CCTString();