sort colors improved

one pass