Files
MeshChatX/meshchatx/src/backend/colour_utils.py
T
Sudo-Ivan 716007802e 0.1.0
2026-01-01 15:05:29 -06:00

9 lines
250 B
Python

class ColourUtils:
@staticmethod
def hex_colour_to_byte_array(hex_colour):
# remove leading "#"
hex_colour = hex_colour.lstrip("#")
# convert the remaining hex string to bytes
return bytes.fromhex(hex_colour)