The yellow badge (or yellow patch), also referred to as a Jewish badge, was a cloth patch that Jews were ordered to sew on their outer garments in order to mark them as Jews in public. It is intended to be a badge of shame associated with antisemitism.
This badge, that was to be eventually used by the Nazis against the Jews, was actually first introduced by a Muslim caliph in Baghdad in the 9th century as a variant of the zunnār belt. This then spread to the western world in medieval times.
As recently as 2001, Afghanistan's Hindus were required by the Taliban to wear yellow badges to segregate "un-Islamic" and "idolatrous" communities from Islamic ones. (read more)