change the color of an input by code

Good afternoon,
I am trying to change the color of my input by means of code since I have a condition and I want that if it is not fulfilled the input of another color different red is put but I do not know how to achieve it, can you help me?

Does this help?

https://www.wix.com/velo/reference/$w/style/color

The way it comes there is just to change the color of the text and I am looking to change the color of an input
How can I do it?

Ok, how about this?