der Saphir
sapphire
A very hard, usually blue gemstone that is used as a jewel.
Ihr Verlobungsring war mit einem großen, tiefblauen Saphir besetzt.
Her engagement ring was set with a large, deep-blue sapphire.

sapphire
Loading your saved state.
sapphire
A very hard, usually blue gemstone that is used as a jewel.
Ihr Verlobungsring war mit einem großen, tiefblauen Saphir besetzt.
Her engagement ring was set with a large, deep-blue sapphire.

You can easily distinguish the meanings: the gemstone is a countable object that one can own. The color is an uncountable quality that describes something.
Sie bekam eine Kette mit drei kleinen Saphiren.
She received a necklace with three small sapphires.
To describe the color, the compound adjective 'saphirblau' (sapphire blue) is used very often. This type of word formation is very common with colors derived from objects.
Sie trug ein saphirblaues Abendkleid.
She wore a sapphire-blue evening dress.
When referring to the gemstone, you often find the word in connection with jewelry. Typical formulations are 'mit einem Saphir besetzt' (set with a sapphire), 'ein Ring aus Saphir' (a ring made of sapphire), or 'ein geschliffener Saphir' (a cut sapphire).
Die Krone war reich mit Diamanten und Saphiren besetzt.
The crown was richly set with diamonds and sapphires.
ruby
'der Rubin' and 'der Saphir' are both valuable gemstones and can also stand for typical colors. They can be confused because both are known as gemstones for jewelry and often appear in rings or necklaces. The most important difference is the color: a ruby is typically red, while a sapphire is typically blue. So if it is about a red stone or a bright red, 'Rubin' fits. For a blue stone or a strong blue, 'Saphir' is more natural.

Emma trägt eine Kette mit einem dunkelblauen Saphir.
Emma is wearing a necklace with a dark-blue sapphire.
Im Ring meiner Großmutter glänzt ein kleiner Rubin.
A small ruby shines in my grandmother's ring.