rawTemperature static method
Implementation
static double rawTemperature(Hct color) {
final lab = ColorUtils.labFromArgb(color.toInt());
final hue = MathUtils.sanitizeDegreesDouble(
MathUtils.toDegrees(math.atan2(lab[2], lab[1])),
);
final chroma = MathUtils.hypot(lab[1], lab[2]);
return -0.5 +
0.02 *
math.pow(chroma, 1.07) *
math.cos(
MathUtils.toRadians(MathUtils.sanitizeDegreesDouble(hue - 50.0)),
);
}