Reasonable approximation to convert color temp to HS color space

I want to convert color temp (in K) to a HS color value.

Asking AI to do the conversion results in a multi step (via RGB) process which doesn’t produce a result which is remotely close.

Some tinkering with the bulbs has left me with the impression that I can simply:

  • Set the Hue to 30.
  • Then adjust the saturation to get a color that is close to most colors produced via color temp (in the range 2000K - 6535K).

Specifically the min and max saturations are “close enough” to extremes of the (K) range.
So I just have to map the saturation to the K value (in that it’s not linear).

Does anyone have an approximation that “kinda works for them”?

I realize that I may have to tinker with this based on which bulbs I have - my primary use case is for Philips Hue bulbs.

I built a thing you can load from HACS that will do it.