Merge "New palette picking algorithm"