change alert color according to rate value