1 2 3 4 5 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}"