Mercurial > code > home > repos > light-bridge
comparison color.py @ 16:ab80e8826441
doc
author | drewp@bigasterisk.com |
---|---|
date | Sun, 28 Jan 2024 21:18:11 -0800 |
parents | 9f427d8073c3 |
children |
comparison
equal
deleted
inserted
replaced
15:61d4ccecfed8 | 16:ab80e8826441 |
---|---|
10 return (1 - t) * a + (t) * b | 10 return (1 - t) * a + (t) * b |
11 | 11 |
12 | 12 |
13 @dataclass(frozen=True) | 13 @dataclass(frozen=True) |
14 class Color(DataClassJsonMixin): | 14 class Color(DataClassJsonMixin): |
15 """This is a target color that should look "the same" on all lights you send | |
16 it to. We convert it somehow to a DeviceColor which has the color | |
17 coordinates (maybe not RGB) that get sent to a light.""" | |
15 r: float | 18 r: float |
16 g: float | 19 g: float |
17 b: float | 20 b: float |
18 | 21 |
19 def __post_init__(self): | 22 def __post_init__(self): |