Javelina/modules/utils.py

7 lines
172 B
Python
Raw Permalink Normal View History

2024-02-20 00:09:00 +02:00
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")