create a linearGradient to fill the star. The 2 stops ensure an instant transition.
<svg>
<linearGradient id="grad" x1="0" x2="0" y1="0" y2="100%">
<stop offset="50%" stop-color="grey"/>
<stop offset="50%" stop-color="white"/>
</linearGradient>
</svg>
then set the fill of the star to this.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…