We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a997f9 commit 42e4d72Copy full SHA for 42e4d72
branca/colormap.py
@@ -46,12 +46,12 @@ def _parse_hex(color_code: str) -> TypeRGBAFloats:
46
47
48
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"""
+ """Convert a byte between 0 and 255 to a normalized float between 0. and 1.0"""
50
return x / 255.0
51
52
53
def _color_float_to_int(x: float) -> int:
54
- """Convert a float between 0. and 1.0 to an integer between 0 and 255"""
+ """Convert a float between 0. and 1.0 to a byte integer between 0 and 255"""
55
return int(x * 255.9999)
56
57
0 commit comments