-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
[ColorUtil] kelvinToXY: Extend Colour Temperature range 1000 K .. 10000 K #4429
[ColorUtil] kelvinToXY: Extend Colour Temperature range 1000 K .. 10000 K #4429
Conversation
Signed-off-by: AndrewFG <[email protected]>
=> @lolodomo for info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @andrewfg,
could we consider restricting the number of tests runs to a reasonable number? 270000 tests take quite a while to complete.
Mybe increasing allHSB::step
to 20 and allRGBW::step
to 25 could be a compromise.... WDYT?
Yeah. :) EDIT: done! |
Signed-off-by: AndrewFG <[email protected]>
bundles/org.openhab.core/src/test/java/org/openhab/core/util/ColorUtilTest.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core/src/test/java/org/openhab/core/util/ColorUtilTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: AndrewFG <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Extend the supported colour temperature range of the
kelvinToXy()
method from 2000 .. 6500 K to 1000 .. 10000 KSee #3891 (comment)
Please note that the inverse
xyToKelvin()
method (which is based on McCamy's approximation) is only accurate above 2000 K. This means that round trip conversionsxyToKelvin(kelvinToXy())
are very inaccurate for colour temperatures below 2000 K. This is not perfect but it seems that most real bindings in OH are using a range of 2000 K to 6500 K .. where the accuracy is better than 1%..Signed-off-by: AndrewFG [email protected]