import colorsys


def darken_color(color, factor):
    """Modify an RGB colour by multiplying its luminance by a given factor."""
    darkcolor = colorsys.rgb_to_hls(*color)
    darkcolor = (darkcolor[0], darkcolor[1] * factor, darkcolor[2])

    return colorsys.hls_to_rgb(*darkcolor)