Get rid of some unreachable abort()s.
Refactor hue comparator into color.c.