Yes it is necessary to know they both. When your playing with Olimar, you should try to have three colors: yellow, purple, and blue. Despite what others have said, I've done tests of my own, and yellow does get a little more distance on every ground-based smash and grab (Forward Smash, Down Smash, all grabs). With yellow and blue, you really trick your opponent, they can't acurately judge knockback because they get hit from 2 different pikmin and with them all in a mass as you stand, you can't really tell which.
Blue Pikmin are good all around, they do a decent amount of damage and Delfilo-Death will never happen to you using them. Just so you know what that is, when you fall in the waters of Delfilo all your Pikmin die and as you jump out your alone and defenseless.
Purple Pikmin are very good for Down Smashes, as your opponent is naturally closer and trying to roll behind you when you do it. I'm a pretty quick attacker, without using C-stick, I quickly string together 3 down smashes to hammer damage or knock opponents back for a grab. When your falling, you can also use Purple Pikmin to knock a person off the edge, it really helps you survive and people won't try to gimp you.
Keep your Pikmin order in mind, when your opponent runs at you, they 99.9999% of the time never see a Purple Pikmin to the face coming, they expect to grab and in Marth's case F-Air. That Pikmin you throw hits him and leaves him open to grabbing from yellow.
The combo I most frequently use with Olimar: Down Grab -> Dash Attack -> Up Aerial -> Up B -> Pikmin spam; usually, racks up a lot of damage. It's also able to be started from other combos or from any point in the combo.
At lower percentages, I do: Down Grab -> Forward Air -> Forward Air -> Up B -> Up Air -> Up Air - Pikmin Spam.
With this combo, a running down grab works nicely, partically because I play mind games throwing Pikmin and retreating from up close. But once you do grab, forward air and sort of lean back out of it once hit, and then lean back in for the second. Unless you hit with a white pikmin, they usually come back in from far away, but this time from the air, not many expect Up B, so aimed correctly, you can bash them off the edge with a Purple or Blue Pikmin. To avoid getting hit again, people tend to grab the ledge or come from directly about. If they come from directly above, Up Air them DI out of the last hit and do it again. If they grab the ledge, there are a number of characters you can grab right off the ledge, including Mr. G&W. After that Pikmin spam them to try and get them back to do it all over again.
This combo works best when started from around 15% ~ 25%.