ioBroker.js-controller
ioBroker.js-controller copied to clipboard
Feature-Request: Predefined Alias read/write functions for color conversion
Would be great to be able to do sth like alias.read=hue2rgb(val) and alias.write=rgb2hue(val)
Maybe some more functions might be interesting too?
Ideas:
- clamp(min, max, value)
- roundTo(value, numDigits)
- other color conversions (HSL; white color temp like mired/kelvin)
- ...
- hex2dec/dec2hex (BE and LE)
I think Math is available in general, so "roundTo" could be replaced, but yes convenient
Maybe allow to define such functions in a central object, then we could say controller (maybe) provides some really core methods and users or adapters can add additional methods.