Answer :
The colour was Black and the Front Man got the answer by carefully listening to the others
Explanation: The front man knows that the man in the Rear who can see the other two hats did not see white hats, if he had seen White hat, he would have said that his own hat was white and the front Man also knows that the second man did not see White hat because if he had seen a white hat, he would have said his own hat was black since the man in the Rear said that he did not know. So the Front man knows that his hat was black by listening to the Rear and the middle man's Answers.