-
-
Notifications
You must be signed in to change notification settings - Fork 94
color temperature (kelvin) and value (luminosity) relationship #188
-
Hi,
first, thank you for that fantastic widget. I integrated it into a Node-RED dashboard widget and it works (nearly) prefect!
I ran into a problem trying to control a tunable white led strip with 3000k and 6000k leds. I use the temperature to control the relationship between the warm white and cold white leds and the value to control the intensity. I thought it would be nice and easy to combine a value and a kelvin slider. The value slider gets colored when I move the temperature, nice. But the temperature slider don't fade together with the value. But the value always jumps to 100% when the temperature changes. Moving the value slider correctly don't change the value.
It would be great if changing the temperature would let the value constant. I looked briefly into the code and found that the conversion of the temperature is "only" to RGB and this likely erases the lightness information.
Any ideas how the get both in sync? (I can have separate sliders for value and temperature and mix the data in Node-RED as a workaround)
Here an example: 1st a combined widget (with the value problem) and second two separate widget)
image
Beta Was this translation helpful? Give feedback.
All reactions
The value slider is tied to the "V" channel in the HSV color model, and when dealing with Kelvin temperatures it goes from Kelvin -> approx. RGB -> HSV, which is why you see that slider jump around. This is also why I don't think it makes sense to detach the value slider from Kelvin either - iro.js only works with digital color, not light.
While I know a lot of people use iro.js to drive LEDs, that stuff really isn't my wheelhouse, so I never really designed it for dealing with light or anything. In the future I'm considering adding a way to define your own custom slider types, but that needs a lot of work and thinking. :)
As a workaround for now, you could just use two separate colorPick...
Replies: 1 comment
-
The value slider is tied to the "V" channel in the HSV color model, and when dealing with Kelvin temperatures it goes from Kelvin -> approx. RGB -> HSV, which is why you see that slider jump around. This is also why I don't think it makes sense to detach the value slider from Kelvin either - iro.js only works with digital color, not light.
While I know a lot of people use iro.js to drive LEDs, that stuff really isn't my wheelhouse, so I never really designed it for dealing with light or anything. In the future I'm considering adding a way to define your own custom slider types, but that needs a lot of work and thinking. :)
As a workaround for now, you could just use two separate colorPicker instances; one with a value slider and another with a kelvin one, and control them with your own code.
Beta Was this translation helpful? Give feedback.