The Supreme Court did this in a set of 1883 cases collectively known as the Civil Rights Cases.
The Civil Rights Act of 1875 had moved to outlaw discrimination in public accommodations. In other words, it banned racial discrimination in places like hotels, restaurants, and theaters. By 1883, a number of cases had been brought based on this law and some of these had reached the Supreme Court. The Court ruled that the Civil Rights Act was unconstitutional because all of the acts it forbade were acts of private individuals, not of governments.
The Court ruled that the 14th Amendment to the Constitution does not apply to private parties. This amendment guarantees all people the “equal protection of the laws.” However, the Court, in an 8-1 decision, held that this only applied to the government. The government could not discriminate, it said, but private individuals could. Since the law banned acts of discrimination by private people, it was unconstitutional.