This link will take you to a page in Murni's site, she provides a very clear explanation of the way in which colours are used in decorative & religious art.
https://www.murnis.com/culture/balinese-symbolism/
Rubies are red, so red relates to which deity?
Sapphires come in a multitude of colours, but let's say we are talking common old blue sapphires, star or otherwise, so we look for the colour blue and that tells us the symbolic relationship to a deity.
The three major colours used in traditional ornamentation of a keris are white, red, black. The colours need not be a pure post-box red, but can be within the red spectrum of colours, and in some cases other colours may be substituted for the major symbolic colour.
Scroll down to the Mandala.
Further, the stones need not be natural, this is not important in the context of symbolism.