On that device, you can change the color, but not “on the fly.” It requires a reconfiguration of the firmware parameters, which requires physically manipulating the sensor, so couldn’t be used in the way you are imagining.
There are a number of other devices that you can use for a similar indicator, people most commonly use these to show whether the security mode is home or away. ( with these days of work at home and school at home, people are also looking for indicator lights for that purpose.)
if you’re interested in those take a look at the following.
The topic covers a number of different options, including making your own little light, light switches that have colored LEDs that you can control, a nightlight that switches color, etc.