On My LEGO Network, bricks are tied to your rank. Each time you level up, Echo hands you one brick in the color matching that rank. Red comes at rank 1, blue at rank 2, yellow at rank 3, and so on up the ladder.
You can also stock up through Max's page. Once it's set up, you can trade a set number of bricks for a module, and after that the bricks start rolling in. Voting on other members' pages gives you a shot at winning an extra brick too, though it doesn't pay off every time.
Keep climbing ranks and playing with the community, and those rarer colors will eventually find their way into your collection.