added distance calculation between colors

and whitespace cleanups