def blend(a, scale, b):
    """
    Returns a color that's 'scale' of the way between 'a' and 'b'.
    (Interpolates RGB space; very simple)
    """
    ar,ag,ab = a
    br,bg,bb = b
    return (min(255, max(0, br- (br-ar)*(1-scale))),
            min(255, max(0, bg- (bg-ag)*(1-scale))),
            min(255, max(0, bb- (bb-ab)*(1-scale))))