Rubies and sapphires are different colored varieties of the mineral corundum. Now corundum is a fairly common mineral. Second only to diamond in hardness it has been mined extensively for abrasives. Gem quality corundum is quite a bit rarer, consisting of only a percent or so of all the corundum found. The most common of the gem grade corundum is blue sapphire.
Sapphire comes in every color of the rainbow and the other colors are rarer than the blues.
This may be a bit of a surprise as the blue ones are so valuable. However, the law of supply and demand comes in here. Most of the people wanting a sapphire are looking for a deep blue gemstone, not something yellow or green. Hot pink sapphires and the pinkish orange variety know as padparasha do demand a high price in the market place. Ruby is the red variety of corundum.