Sort colors one pass