Make light change when player is detected

So i’m making a stealth based game and i have AI which roams around the area randomly and when it detects the player it runs towards the players location, i have attached a point light and spotlight to the AI as its pretty dark and i would like to know how i would make the point light and spot light change colour when the AI detects my character

I’ve figured it out, i was focusing on the AI perception and if it can see me or not but i just made it so when the AI is roaming about with its walk speed the light is set to normal and when it detects me and runs towards me the light changes colour