jaames / iro.js

🎨 Modular color picker widget for JavaScript, with support for a bunch of color formats
https://iro.js.org
Mozilla Public License 2.0
1.3k stars 81 forks source link

When value slider turned down to 0, output is fully enabled #219

Closed Olifant1990 closed 2 years ago

Olifant1990 commented 2 years ago

Using this setup: var colorPicker = new iro.ColorPicker('#colorPicker', { layout: [{ component: iro.ui.Slider, options: { // can also be 'saturation', 'value', 'red', 'green', 'blue', 'alpha' or 'kelvin' sliderType: 'kelvin', //sliderShape: 'circle' } }, { component: iro.ui.Slider, options: { // can also be 'saturation', 'value', 'red', 'green', 'blue', 'alpha' or 'kelvin' sliderType: 'value' } }] });

  1. If you slide the Kelvin slider fully to the left, so wharm white is selected
  2. Slide the value slider down to dark/0
  3. Then the output of the Kelvin is cool white.

Maybe the biggest problem/cause of this is that Kelvin still uses an RGB value in background. See my other feature request for an Kelvin option that is not based on RGB. That could fix this problem too.

jaames commented 2 years ago

"Value" here is the the "V" part of the "HSV" color model, so changing it is also going to change the color. If you're using iro.js to control LEDs and want a separate brightness slider then you will have to implement that yourself. iro.js is a generic color picker library, not an LED driver.