Skip to content

Add missing docstring params #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions colorsys.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@


def hls_to_rgb(hue: float, light: float, sat: float) -> Tuple[float, float, float]:
"""Converts HLS to RGB values"""
"""Converts HLS to RGB values

:param float hue: The hue of the color to convert
:param float light: The lightness of the color to convert
:param float sat: The saturation of the color to convert
"""

if sat == 0.0:
return light, light, light
if light <= 0.5:
Expand Down Expand Up @@ -77,7 +83,12 @@ def _v(chroma1: float, chroma2: float, hue: float) -> float:
def hsv_to_rgb( # pylint: disable=too-many-return-statements,inconsistent-return-statements
hue: float, sat: float, val: float
) -> Tuple[float, float, float]:
"""Converts HSV to RGB values"""
"""Converts HSV to RGB values

:param float hue: The hue of the color to convert
:param float sat: The saturation of the color to convert
:param float val: The value (or brightness) of the color to convert
"""
if sat == 0.0:
return val, val, val
i = int(hue * 6.0) # assume int() truncates!
Expand Down