How did the supreme court link the power to regulate commerce with civil rights?

The Commerce Clause of the Constitution (Article I, Section 8, Clause 3) delegates to Congress the power.