@Override
	public int compare(Color o1, Color o2) {
		int v1 = colorFunction1.apply(o1);
		int v2 = colorFunction1.apply(o2);
		int result = v1 - v2;
		if (result == 0) {
			v1 = colorFunction2.apply(o1);
			v2 = colorFunction2.apply(o2);
			result = v1 - v2;
			if (result == 0) {
				v1 = colorFunction3.apply(o1);
				v2 = colorFunction3.apply(o2);
				result = v1 - v2;
			}
		}
		return result;
	}
Class for sorting colors by rgb values.  Each enum values changes the order of comparison for the
red, green, and blue color values.
Ghidra/Framework/Docking/src/main/java/docking/theme/gui/ColorSorter.java