style.BackgroundColor does not set color

I am trying to set the background color of a text input and it doesn’t work. I’ve tried the following:

$w('#ins').style.backgroundColor = "#FF00FF";
$w('#ins').style.foregroundColor = "#00FF00";
$w('#ins').style.color = "#555500";

I’ve put this in my onReady function. The only color I see is the foreground color. Am I doing something wrong, or does WIX code somewhere override my code?

Thanks!

Your code is fine (but I don’t think a textbox has a a foreground).
The background and color (which is the font color) should work.

Ok, but the background color doesn’t. So, does WIX code somewhere override my code?

@wixrunner22

J. D. is correct, you can’t use foreground colour on text box, it is only used on a progress bar.
https://www.wix.com/corvid/reference/$w.Style.html#foregroundColor

Ok, thanks. But my question is about the background color. I used those 3 to see which ones appeared in the text box. How do I change the color of the whole text box?

@wixrunner22 Use the background, exactly as you wrote above.
And be sure you used the TextBox (which is an input element) and not just Text.