def darken_color(color, amount):
    """Darken a hex color."""
    color = [int(col * (1 - amount)) for col in hex_to_rgb(color)]
    return rgb_to_hex(color)
def darken_color ( color , amount ) : color = [ int ( col * ( 1 - amount ) ) for col in hex_to_rgb ( color ) ] return rgb_to_hex ( color )
Darken a hex color.