This is the same person that put "all men are created equal" in the declaration of independence. Coincidence? Probably not.
John Locke had investments in slave trade companies. So he could've greedy instead of sincerely racist.
Many of these "great minds" were products of their times. You could say they were sexist too but it doesn't mean most of them actually thought all men were superior to all women. But if you asserted that women be treated equally to men back in 1776 you would be laughed out of power.
They also put "blacks are 3/5th of a person" in the U.S. Constitution, therefore not constituting them as men, but merely three fifth of men. It's also important that the term "men" refers strictly to "white adult males who owned property", i.e. not all free persons, certainly not blacks, not women and in some states not non European immigrants. So yes they were racist.
And they may be a product of their time, but remember the Elites were the ones who set the Government. It's a top down procedure. If they were truly "not racist" they would've have changed it given the opportunity, which they had. But they didn't. Benjamin Franklin certainly was the most progressive, and Jefferson was progressive
for his time, i.e his racism did not imply he was not progressive. So yes, among great minds we've seen racist people emerge.
Even Hitler and Stalin, who were supremely evil, qualify as great minds. Lincoln himself, another great mind, said directly he believed himself superior to blacks despite seeking their freedom. Those things still qualify as racism in any time period, and while Lincoln may have had to temper his beliefs in politics. Jefferson, Washington, Adams, Madison, Jay, Hamilton, Franklin and others did not. They created a nation, one that did not protect the rights or even the lives of blacks. That action in and of itself speaks volumes more than any philosophical musings they may have had on black people.