def mid_color(c1, c2):
    """Returns medium color between c1 and c2"""
    r = int(0.5 * (c1[0] + c2[0]))
    g = int(0.5 * (c1[1] + c2[1]))
    b = int(0.5 * (c1[2] + c2[2]))
    try:
        a = int(0.5 * (c1[3] + c2[3]))
        return r, g, b, a
    except IndexError:
        return r, g, b
