Skip to content

Commit 27662eb

Browse files
authored
Merge pull request #21 from tekktrik/doc/add-missing-params
Add missing docstring params
2 parents b729a62 + 6d9a227 commit 27662eb

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

colorsys.py

+13-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,13 @@
4242

4343

4444
def hls_to_rgb(hue: float, light: float, sat: float) -> Tuple[float, float, float]:
45-
"""Converts HLS to RGB values"""
45+
"""Converts HLS to RGB values
46+
47+
:param float hue: The hue of the color to convert
48+
:param float light: The lightness of the color to convert
49+
:param float sat: The saturation of the color to convert
50+
"""
51+
4652
if sat == 0.0:
4753
return light, light, light
4854
if light <= 0.5:
@@ -77,7 +83,12 @@ def _v(chroma1: float, chroma2: float, hue: float) -> float:
7783
def hsv_to_rgb( # pylint: disable=too-many-return-statements,inconsistent-return-statements
7884
hue: float, sat: float, val: float
7985
) -> Tuple[float, float, float]:
80-
"""Converts HSV to RGB values"""
86+
"""Converts HSV to RGB values
87+
88+
:param float hue: The hue of the color to convert
89+
:param float sat: The saturation of the color to convert
90+
:param float val: The value (or brightness) of the color to convert
91+
"""
8192
if sat == 0.0:
8293
return val, val, val
8394
i = int(hue * 6.0) # assume int() truncates!

0 commit comments

Comments
 (0)