All the revive spells say in their material requirement that they need "A diamond worth at least X gp, which the spell consumes". My question is what counts as a diamond? Does it need to be a clear diamond or can it be any other gem like ruby or garnet?
It must be an actual diamond, not some other gem.
Such spells specify that the item must be a diamond, i.e. a transparent shiny crystal made of carbon (or whatever it might be in a D&D world).
Rubies and garnets are very different from diamonds, both in real life and D&D. If it's acceptable for a spell to use any gem, it will say so specifically. For example, the Minimus Containment version of the Imprisonment spell uses the following language:
The special component for this version of the spell is a large, transparent gemstone, such as a corundum, diamond, or ruby.
Because the come-back-from-the-dead spells do not have this language, and specify "diamond," you must use a diamond.