HTML Color Input to Image

I am trying to write a simple html document that returns a downloadable square image of a color defined by the user input of a single color. Any help would be much appreciated.

No code yet, any source code is appreciated.