Form field input background grey when empty, white when filled.

Is it possible to have different background colors when the form field is empty (gray) and when it is filled (white)?