Various countries try to curb racism by making it a criminal offense.
In **Switzerland**, for example, we have the *Anti-Rassismusgesetz* ¹. The keywords are *öffentlich* (publicly), *Propagandaaktionen* (acts of propaganda), and *Leistung, die für die Allgemeinheit bestimmt ist* (services intended for the general public). Thus, racism within your own family, within your circle of friends in the pub, or on the phone while talking to somebody you know is ok. The law is not intended to have people spy on each other. The law intends to prevent public offenses: When somebody wants to go to a pub and somebody insults him or the owner tries to expel him with reference to *Rasse, Ethnie oder Religion* (race, ethnic background, or religion), then that constitutes a criminal offense.