def brighten(color, brightness):
    """
    Adds or subtracts value to a color.
    """
    h, s, v = rgb_to_hsv(*map(down_scale, color))
    return tuple(map(up_scale, hsv_to_rgb(h, s, v + down_scale(brightness))))
def brighten ( color , brightness ) : h , s , v = rgb_to_hsv ( * map ( down_scale , color ) ) return tuple ( map ( up_scale , hsv_to_rgb ( h , s , v + down_scale ( brightness ) ) ) )
Adds or subtracts value to a color.