[F] set_light should be float

This commit is contained in:
Azalea (on HyDEV-Daisy) 2022-06-19 17:39:39 -04:00
parent b46d0e96f4
commit 5de1bf65e4
3 changed files with 5 additions and 5 deletions

View file

@ -170,11 +170,11 @@ class RGB(NamedTuple):
"""
return RGB(*redistribute_rgb(*[v * multiplier for v in self]))
def set_light(self, light: int) -> 'RGB':
def set_light(self, light: float) -> 'RGB':
"""
Set HSL lightness value
:param light: Lightness value
:param light: Lightness value (0-1)
:return: New color (original isn't modified)
"""
h, l, s = colorsys.rgb_to_hls(*[v / 255.0 for v in self])