I have the following code:
You probably can't, like that. The best way to do this would be something like this SO answer: Multiple font colors in an Input tag
In essence, a second div is put over the input field, allowing for the change in colour.