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