Sort list of colors by HSV/HSB
问题 I am looking to sort a very long list of colors by their HSV/HSB values. I would like to sort them by Hue, then Sat, then Bright. Really all I need is a way to tell if one color comes "before" or "after" based on that order of HSV since I am just going to make a compareTo() in Java and use a TreeSet to do the ordering. In Java, HSV values are all stored as floats. I am terrible at algorithms like these so any help would be appreciated! 回答1: The brute force way: public final class