fix color_mult function

This commit is contained in:
lelgenio 2020-12-07 15:21:40 -03:00
parent 7f74155d2a
commit 65325cfb30
1 changed files with 3 additions and 0 deletions

View File

@ -59,6 +59,9 @@ def color_mult(e: str, amount: float):
base256 = int(s, base=16)
result_val = base256 * amount
# normalize between 0 and 255
result_val = min(255, max(0, result_val))
hex_result = hex(int(result_val))[2:]
return str(hex_result)