As for the link under discussion.... meh. RGB (and derivative color models like HSL/HSV) are terrible for color sorting, because they have very little relation to the way humans see color. Trying to sort a three-dimensional quantity into a single linear order in some “best” (or even “reasonable”) way is inherently futile. I guess it can be fun to play with, but IMO isn’t very “practical”.
http://nbviewer.ipython.org/gist/CamDavidsonPilon/abe3f0e4f5...