What's the name of this sorting(?) algorithm?
If we can assume that there is a total order on all colors: to find the largest element, there is a straightforward $O(n)$-time algorithm to find it: you scan through all colors, keep tracking of the largest element seen so far:

Set $m$ to the first color.
For each other color $c$:

Set $m := \max(m,c)$.



(Here $\max$ refers to the larger of the two colors, i.e., whichever is more preferred.) There is no need to &quot;sort&quot; all of the colors to find the largest (most favorite) color.
Alternative, suppose we cannot assume the colors are totally ordered, and the order is a partial order.  Then you'd need to specify what is meant by &quot;most favorite&quot; color.  One possible definition is a maximal color, i.e., one where no other color is more preferred.  (Note that there may be multiple such colors.)  If so, you can again find it via the same linear scan (if two elements are incomparable, you stick with the current element).