Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iro.js to control cold white / warm white led strips #165

Closed
klaus-liebler opened this issue Mar 18, 2021 · 2 comments
Closed

iro.js to control cold white / warm white led strips #165

klaus-liebler opened this issue Mar 18, 2021 · 2 comments

Comments

@klaus-liebler
Copy link

klaus-liebler commented Mar 18, 2021

Hi Devs,

I am about to develop a ESP32-based hardware and a webUI to control cold white / warm white led strips and RGB stips (Details: Hardware: https://github.com/klaus-liebler/sensact/tree/master/pcb/sensactOutdoor Firmware: https://github.com/klaus-liebler/sensact/tree/master/firmware_sensactOutdoor). I would like to embed iro.js in the UI. CW/WW strips need two dimensions: the CW/WW ratio and the general brightness.

I tried

let kelvinPicker = new iro.ColorPicker("#kelvinPicker", {
            width: Math.min(400, width),
            layoutDirection: 'vertical',
            layout: [
              {
                component: iro.ui.Slider,
                options: {
                  sliderType: 'kelvin',
                }
              },
              {
                component: iro.ui.Slider,
                options: {
                  sliderType: 'saturation',
                }
              },
            ]
          });

and then with value instead of saturation. In both cases, the problem is, that moving one slider moves the other as well. I would like to have two completely independend sliders: one for the CW/WW ratio and one for the brightness.

Is this possible with iro.js. If yes, how?

Thank you very much!

Regards,

Klaus

@jaames
Copy link
Owner

jaames commented Mar 18, 2021

You'd just need to create two separate color pickers; one with the kelvin slider and another with the value slider

@jaames jaames closed this as completed Mar 18, 2021
@klaus-liebler
Copy link
Author

Thank you - it works perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants