change input text color code example

Example 1: placeholder css

::-webkit-input-placeholder {color: pink;} /* Chrome/Opera/Safari */
::-moz-placeholder { color: pink;} /* Firefox 19+ */
:-ms-input-placeholder { color: pink;} /* IE 10+ */
:-moz-placeholder {color: pink;}  /* Firefox 18- */

Example 2: javascript change color of text input

document.getElementById("yourInputID").style.color = 'the color of your choice';

Example 3: change textinputlayout color

android:textColorHint="@color/your_color"

Example 4: input background color

<input style="background-color: gold;" type="text" value="">

Example 5: style input field

#userInfoForm {
    width: 80%;
    padding: 5px 5px;
    margin: 0 auto;
    background: #FF6700;
    border-radius: 25px; 
}

#userInfoForm input {
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    box-sizing: border-box;
    border-radius: 25px;
}