Javelina/modules/utils.py
2024-02-19 23:09:00 +01:00

7 lines
172 B
Python

def hex_to_int(hex_color: str) -> int:
return int(hex_color.lstrip("#"), 16)
def int_to_hex(integer_color: int) -> str:
return "#" + format(integer_color, "06x")