big upgrades to upgrade system
This commit is contained in:
6
app/pylocal/util.py
Normal file
6
app/pylocal/util.py
Normal file
@@ -0,0 +1,6 @@
|
||||
def hex_to_rgb(hex: str):
|
||||
hex = hex.lstrip("#")
|
||||
return tuple(int(hex[i:i+2], 16) for i in (0, 2, 4))
|
||||
|
||||
def rgb_to_hex(r: int, g: int, b: int):
|
||||
return f"#{int(r):0>2x}{int(g):0>2x}{int(b):0>2x}"
|
Reference in New Issue
Block a user