It's not so much a mistake, more a question of style and idiom. English doesn't normally use the "of" construction when something belongs to a person or, often, an animal; we prefer to use the possessive form using the apostrophe. Your sentence sounds much better like this:
The gentlemen's hats are black.
- For Teachers