Evaluated proc hexdist {h1 h2} { set rgb1 [hex2rgb $h1]; set rgb2 [hex2rgb $h2]; expr sqrt(([first $rgb2]-[first $rgb1])^2 + ([second $rgb2]-[second $rgb1])^2 + ([last $rgb2]-[last $rgb1])^2) }