def rgb2hex(rgb) -> str:
    """Convert an RGB sequence to a hexadecimal color.

    The values of the sequence need to be in ``range(256)``.

    >>> rgb2hex([0, 255, 255])
    '#00ffff'
    """
    return '#%02x%02x%02x' % tuple(rgb)