set input color code example
Example 1: javascript change color of text input
document.getElementById("yourInputID").style.color = 'the color of your choice';
Example 2: input type color
<input type="color" value="#f6f82" id="colorPicker">
document.getElementById("yourInputID").style.color = 'the color of your choice';
<input type="color" value="#f6f82" id="colorPicker">