-
Notifications
You must be signed in to change notification settings - Fork 145
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
hsl(hue, sat, briPercent) is hsb #60
Comments
Can you give me more information around how you are doing this, i.e. a code snippet? I have just put together a test for this on my bridge calling using state.on().hsl(0, 100, 100);
hue.setLightState(lightId, state) and the light is correctly set to those values. |
I use the same code as you :) but
Have to turn on the light in white not in red. In fact in your api there a confusion between brightness and luminance. Normally the function have to be rename to hsb and not hsl (witch it could be nice to have). For example test it here : It's more clear ? |
I just create a pull request to fix this. Let me know what do you think about it. |
Thanks for the pull request, (silly refactoring removed similar code some time back, and implemented it as hsb). I added some tests to exercise the code changes, they are somewhat bound to my own bridge and lights. |
You're welcome :) thanks for the merge! In fact in the hsl, I just calcul the sat and brightness from the the given sat and luminosity. The calculated value is not luminosityValue but brightnessValue.
Any idea when you can put this on npm ? :D |
It's in the 1.2.0 release, which went out last night |
Ho great ! I didn't see it thanks ! |
Hi,
I found a problem with the API,
If I set hsl(0, 100, 100) it make the light Red but the good value in HSL for red is hsl(0, 100, 50).
Anyone agree with this ?
The text was updated successfully, but these errors were encountered: