In the US, this has generally come about as the U.S. Supreme Court interprets the protections of the 13th, 14th and 15th amendments to the Constitution to require the protection of the rights of ethno-social minorities to the vote, public accommodations, marriage, and other rights taken for granted by the majority against the will of a majority to suppress those rights.