mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-04-27 16:10:32 +00:00
10 lines
252 B
Python
10 lines
252 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)
|