change text color using this innerhtml code example
Example: how to change innerhtml color
document.getElementById("usernameError").innerHTML = "<span style='color: red;'>
this.style.color = "white";
document.getElementById("usernameError").innerHTML = "<span style='color: red;'>
this.style.color = "white";