The same goes for the case of gemstones as well. Different diamond cocktail rings for women are colored in a certain shade because of selective absorption.
To understand the phenomenon better, consider the case of a yellow colored shirt. The fibers and dyes present in it absorb only certain wavelengths of the white light that falls on it. The absorbed wavelengths include red, orange, violet, green, and blue. However, the only leftover color, yellow, is reflected back to the eyes, which is interpreted by the brain as the color of the shirt. In the case of transparent or translucent objects, the color that we perceive is a mixture of the color reflected as well as transmitted.
When it comes to the color of a gemstone, that will also depend solely on the wavelengths of light absorbed by the stone. If none of the colors is absorbed, it will be colorless, appearing transparent. At the same time, if an equal amount of every wavelength is absorbed, the gemstone will look grayish, while absorbing all the wavelengths completely gives us black gemstones.