diff options
Diffstat (limited to 'utils.py')
-rw-r--r-- | utils.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/utils.py b/utils.py new file mode 100644 index 0000000..ec402a4 --- /dev/null +++ b/utils.py @@ -0,0 +1,6 @@ +def rgb_to_hex(rgb_list: list[int]) -> str: + """ + Converts a list of RGB values to a hex string. + """ + r, g, b = rgb_list + return f"#{r:02x}{g:02x}{b:02x}" |