fill hex string with left zeroes

This commit is contained in:
lelgenio 2020-12-13 22:31:24 -03:00
parent 1c3005f47c
commit fab739ae9b
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ def color_mult(e: str, amount: float):
hex_result = hex(int(result_val))[2:]
return str(hex_result)
return hex_result.zfill(2)
prefix = "#" * e.startswith("#")
return prefix + "".join(map(segment, split_hex(e)))