Thanks for your reply @daniel_hall, but I’m still not clear on this so please bear with me …
How do Kelvin values affect the interpretation of the HSL color space? Is this documented somewhere?
Do Kelvin values override HS settings?
I just ran a test — putting a state with a color of:
… gets you a very cold white, which, after applying and polling the lights, looks like it was interpreted to have a 0 saturation.
Putting a state with a color of:
… without specifying a Kelvin value … gets you pure red, with the lights reporting the specified 1.0 saturation, as well as the residual 9000 Kelvin value from the previous setting.
So if I’m understanding this correctly, setting a Kelvin value overrides any saturation setting in that color and sets it to 0.
Is that right?
If that is the case, Kelvin->Kelvin interpolations are, as you say, linear interpolations between Brightness and Kelvin values.
HS->HS interpolations, similarly, can be handled by putting states with only HSL components and doing linear interpolation. All fine so far.
But what about HS->Kelvin interpolations? I would think that in order to go from HSB(1) to KB(2), you’d just linearly interpolate B(1)->B(2) while ramping the saturation from S to 0, but in order for that ramp to approach the correct white point, you’ll need to set the Kelvin ‘target’ before you begin the interpolation, and, in so doing, if even for a moment, you’ll get a flash of that Kelvin color because assigning Kelvin colors overrides the Sat to 0. Would you then try to set the Kelvin target and then ‘instantly’ reset the initial color to the previous HS? This produces said (not very short, undesirable) flash of the target Kelvin setting.
I tested setting a state with a 10s transition duration, from a starting color with 1.0 saturation to an ending Kelvin value, and saw the Kelvin values interpolating as the transition played out, which meant that the transition was headed towards a (spurious, residual) initial Kelvin value that moved towards the target setting as the transition played out. This should, in my opinion, not be the expected behavior.
Is there any way to ‘silently’ set the target Kelvin value without putting it live to the lights?