Is it possible to set_property color to gradient from hardware?

I have working project with temperature sensor. If sensor is unreadable I set Gauge color to some ERR_COLOR, but how could I again change color of gauge if sensor starts working? I can set it to any color, but is there a option to set color as gradient (like from the app)?