def colordiff(rgb1, rgb2):
    """From w3c (greater than 500 is good).
       (range [0..765])
    """
    r, g, b = rgb1
    r2, g2, b2 = rgb2
    return max(r, r2) - min(r, r2) + max(g, g2) - min(g, g2) + max(b, b2
        ) - min(b, b2)
