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

Use modelid to set color gamut #9

Open
hobinjk opened this issue Feb 8, 2018 · 1 comment
Open

Use modelid to set color gamut #9

hobinjk opened this issue Feb 8, 2018 · 1 comment

Comments

@hobinjk
Copy link
Contributor

hobinjk commented Feb 8, 2018

Set the color gamut in cssToXYBri and xyBriToCSS using this formula:
https://developers.meethue.com/documentation/color-conversions-rgb-xy
and this modelid-derived data:
https://developers.meethue.com/documentation/supported-lights

@hobinjk
Copy link
Contributor Author

hobinjk commented Feb 12, 2018

The issue I encountered with the unconstrained gamut was the brightness level (Y) suggested by the formula being far lower than it should be. I think with constraints the proper approach is

  1. get X Y Z and x y z from color
  2. constrain x and y to gamut
  3. get z' from x' and y'
  4. use Z/z' to scale y' into Y'

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

1 participant