HSL colour setting not working as planned


#1

I am trying to set a custom colour on my light based on what i see in the IDE ( i set mine in the hue app and then refresh the device in IDE) and then set in WC.

However when set the piston triggers but set the HSL to a different outcome based on what i see in the IDE.
This is what i input . Should i be not just copying what i see in the IDE?

image

image


#2

L should be 54?


#3

I agree with @eibyer. This line should do what you want:
temp

(levels should always be between 1-100)


You might have already discovered this, but for the benefit of others reading this thread:

The IDE returns level, hue, saturation, color, and colorTemp… However with Philips Hue, whenever we want to USE those numbers, it is important to only use Hue, Saturation and Level.
(It is counter-intuitive, but if you are matching colors, do not use color or colorTemp)


For future reference, this is the piston I use to gather the current color of a bulb so I can recall those HSL numbers anytime in the future:

This gives me the info I need in one click, instead of poking around in the IDE…


Can't figure out how to change color "Lightness" in webCoRE with Hue lightstrip
Can't figure out how to change color "Lightness" in webCoRE with Hue lightstrip
#4

Adding to this

If I enter the following into the evaluator:
{hslToHex(0,100,50)} »»» (string) #800000

That result is wrong

according to several online calculators, the answer should be #FF0000


Can't figure out how to change color "Lightness" in webCoRE with Hue lightstrip
#5

yup, its clearly broke in the conversions.

I threw some of the methods from this in and it now it returns the proper values:

https://www.w3schools.com/lib/w3color.js


#7

Hi, Can you tell me what you did to get it to work? The “Level” in webcore seems to be the bulb brightness, not the color lightness.


#8

Can you show your piston, and which device handler you are using?

If you are not using a color device, you are correct level could be the dimmer level.