Setting the led color based on the app state