Adding color to a form control

Hello,

I’m trying to add a color to a form control based on it’s value. I don’t find any code reference online to do this. I’m working on d365 f&0. I appreciate your help on this.Thank you