Carrying order
When Red Pikmin carry a pellet or enemy, they bring it to the red onion. Yellow Pikmin take them to the yellow onion. Blue Pikmin take them to the blue onion. Purple or White Pikmin will choose an onion randomly. However, if mixed colours carry them, it gets more complicated.
If it is a mixture of any of the "primary" Pikmin (Red, Yellow, Blue), the colour of onion with the most Pikmin of that colour will get the item. If the numbers of each colour carrying it is equal, or there are, say, an equal amount of Blues and Yellows and less Reds than either groups, the Onion is chosen randomly from the equal colours.
If any Purple or White Pikmin are carrying with a primary Pikmin, they will simply be ignored, and the above rules will apply. For example, if 20 Whites and 5 Reds are carrying the item, it will still be brought to the Red Onion, since the White are ignored.