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!