sortColors method

void sortColors()

Sorts colors based on their saturation.

Less saturated colors will be at the beginning of the list.

Implementation

void sortColors() {
  sort(
    (a, b) => HSVColor.fromColor(a)
        .saturation
        .compareTo(HSVColor.fromColor(b).saturation),
  );
}