lights: more color refactoring

- clamp values via helper functions
- unify channel access as long
  slightly more ram, but we no longer cast values that are 32bit-wide anyway
- remove css option, send unconditionally as /hex
- reimplement hsv conversion functions (based on HA / python's colorsys)
  simplify calculations and allow to return standalone value structs for
  RGB and HSV
- named channel accessors
- implement HA color inputs / outputs
This commit is contained in:
Maxim Prokhorov
2021-02-26 17:31:54 +03:00
parent 2a08ccb211
commit 1a5f95c02e
4 changed files with 773 additions and 242 deletions

File diff suppressed because it is too large Load Diff