It's a common quote to attribute to him. Did he ever actually say/write it?
A customer can have a car painted any color he wants as long as it’s black.
In My Life and Work (1922) Ford wrote:
Therefore in 1909 I announced one morning, without any previous warning, that in the future we were going to build only one model, that that model was going to be Model "T", that the chassis would be exactly the same for all cars and I remarked:
"Any customer can have a car painted any color that he wants so long as it is black".
I cannot say that any one agreed with me. The selling people could not of course see the advantages that a single model would bring about in production.