def lighten(color):
    """Return a lighter color."""
    # TODO: handle color spaces.
    hue, saturation, value = rgb_to_hsv(*color.to('srgb')[:3])
    value = 1 - (1 - value) / 1.5
    if saturation:
        saturation = 1 - (1 - saturation) / 1.25
    return parse_color(
        'rgb(%f%% %f%% %f%%/%f)' % (*hsv_to_rgb(hue, saturation, value), color.alpha))
Return a lighter color.
weasyprint/draw/color.py