The case of Shelley v. Kraemer 1948 determined that a restrictive covenant on a property that was based on race is not enforceable through the courts. The judgment determined that a racially based restrictive covenant could only be willingly upheld, and if there was not agreement between parties, then it could not be upheld at all because the courts would not uphold something that is discriminatory in nature.
The case arose when a black family bought a home that had such a restrictive covenant on it. A plaintiff that lived 10 blocks away took the case.
Before the 1948 ruling, there were several similar types of restrictive covenants on properties in certain areas of the United States. This changed after the Supreme Court ruling, and now restrictive covenants based on race are understood to be by agreement only, and are very rarely seen.
Most restrictive covenants relate to the owner(s) not being able to do something rather than being of a certain type of person or character.