From fab739ae9b02629ba630f441c69e97d4e2f57ebd Mon Sep 17 00:00:00 2001 From: lelgenio Date: Sun, 13 Dec 2020 22:31:24 -0300 Subject: [PATCH] fill hex string with left zeroes --- funcs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/funcs.py b/funcs.py index 0bcd251..590da67 100644 --- a/funcs.py +++ b/funcs.py @@ -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)))