Skip to content

Commit 2de024f

Browse files
committed
docstrings
1 parent f001aa1 commit 2de024f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

branca/colormap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ def _parse_hex(color_code: str) -> TypeRGBAFloats:
4646

4747

4848
def _color_int_to_float(x: Union[int, float]) -> float:
49-
"""Convert an integer between 0 and 255 to a float between 0. and 1.0"""
49+
"""Convert a byte between 0 and 255 to a normalized float between 0. and 1.0"""
5050
return x / 255.0
5151

5252

5353
def _color_float_to_int(x: float) -> int:
54-
"""Convert a float between 0. and 1.0 to an integer between 0 and 255"""
54+
"""Convert a float between 0. and 1.0 to a byte integer between 0 and 255"""
5555
return int(x * 255.9999)
5656

5757

0 commit comments

Comments
 (0)