(color, ratio=0.5)
return (
        red + (1.0 - red) * ratio,
        green + (1.0 - green) * ratio,
        blue + (1.0 - blue) * ratio,
        alpha,
    )
Creates a lighter version of a color given by an RGB triplet.

    This is done by mixing the original color with white using the given
    ratio. A ratio of 1.0 will yield a completely white color, a ratio
    of 0.0 will yield the original color.
Creates a lighter version of a color given by an RGB triplet.
Creates a lighter version of a color given by an RGB triplet .
def lighten(color, ratio=0.5):
    """Creates a lighter version of a color given by an RGB triplet.

    This is done by mixing the original color with white using the given
    ratio. A ratio of 1.0 will yield a completely white color, a ratio
    of 0.0 will yield the original color.
    """
    red, green, blue, alpha = color
    return (
        red + (1.0 - red) * ratio,
        green + (1.0 - green) * ratio,
        blue + (1.0 - blue) * ratio,
        alpha,
    )
def lighten ( color , ratio = 0.5 ) : red , green , blue , alpha = color return ( red + ( 1.0 - red ) * ratio , green + ( 1.0 - green ) * ratio , blue + ( 1.0 - blue ) * ratio , alpha , )