6.8301-Project/utils.py
2024-04-12 19:09:21 -04:00

6 lines
171 B
Python

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}"