Where did the expression its like the pot calling the kettle black originate from?

It came from the time when cooking was done in a pot and water was boiled in a kettle by hanging them over a fire. They both got charred on the bottom.