Blue I believe is the hardest ribbon to recieve (and therefore rarest) due to the low rate of which people gather friendly/helpful in comparison to teamwork/helpful.
Also it doesnt matter what order the ribbons you get you'll keep the rarest visible as long as you have it. That said some believe that getting a new ribbon will make a check to see if you diserve any other ribbons you own and remove it immediately instead of after the grace period. The priorities for which showed up was onced bugged making the yellow ribbon appear more than the blue one previously (actually not sure if they fixed this bug - but it was confirmed to be a bug).
Although while the rarest ribbon is indeed blue, that's only due to the fact everyone who has blue generally had yellow first and to upkeep the blue ribbon you'll generally upkeep your yellow one. This means blue is more rare but a large portion of people who have the yellow ribbon are not actually showing it (which may mean less people have it showing).