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

Accept xy points in set color(s) #9

Merged
merged 2 commits into from Nov 6, 2019

Conversation

chmac
Copy link
Collaborator

@chmac chmac commented Nov 6, 2019

I had some weird issues with my lights immediately changing colour when I tried to read their xy values and set a very similar xy value. I dug into it a little and it looks like the issue is in the conversion of my xy values -> hex and then back to xy. As an alternative, I added a little tweak that accepts an XYPoint instances directly, and skips the conversion if so.

What do you think? Make sense to merge?

Tests still pass, but I haven't added any tests that explicitly check the XYPoint variant. It does work for me locally, but that's not saying much! :-)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 5bfbe1c on chmac:accept-xy-points-in-set-color into d9854ec on bjohnso5:master.

@bjohnso5
Copy link
Owner

bjohnso5 commented Nov 6, 2019

This seems like a solid change, since the conversion from hex to CIE colorspace is definitely going to be lossy.

@bjohnso5 bjohnso5 merged commit 41eb175 into bjohnso5:master Nov 6, 2019
chmac added a commit to chmac/lightflow that referenced this pull request Nov 8, 2019
This is dependent on a change I proposed which may or may not be merged:
bjohnso5/hue-hacking-npm#9
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

Successfully merging this pull request may close these issues.

None yet

3 participants