def _mix_colors(c1, c2, v):
    """Mixes two colors according to v in the 0-1 range
    where 0 only r1 and 1 only r2 and e.g. 0.5 is exactly in between"""
    r1, g1, b1 = c1
    r2, g2, b2 = c2
    return int(r2 * v + r1 * (1 - v)), int(g2 * v + g1 * (1 - v)), int(b2 *
        v + b1 * (1 - v))
