Among the first victims of persecution in Nazi Germany were political opponents—primarily Communists, Social Democrats, and trade unionists. Jehovah's Witnesses refused to serve in the German army or take an oath of obedience to Adolf Hitler and consequently were also targeted. The Nazis harassed German male homosexuals, whose sexual orientation was considered a hindrance to the expansion of the German population. "Habitual" homosexuals were incarcerated in prisons; many were later remanded to concentration camps following the completion of their sentences.
The Nazis persecuted those they considered to be racially inferior. Nazi racial ideology primarily vilified Jews, but also propagated hatred for Roma (Gypsies) and blacks. The Nazis viewed Jews as racial enemies and subjected them to arbitrary arrest, internment, and murder. Roma were also singled out on racial grounds for persecution. The Nazis viewed Poles and other Slavs as inferior, and slated them for subjugation, forced labor, and sometimes death. Jewish prisoners received the most brutal treatment in Nazi concentration camps.
From 1938, Jews in the camps were identified by a yellow star sewn onto their prison uniforms, a perversion of the Jewish Star of David symbol. After 1939 and with some variation from camp to camp, the categories of prisoners were easily identified by a marking system combining a colored inverted triangle with lettering. The badges sewn onto prisoner uniforms enabled SS guards to identify the alleged grounds for incarceration.
Criminals were marked with green inverted triangles, political prisoners with red, "asocials" (including Roma, nonconformists, vagrants, and other groups) with black or—in the case of Roma in some camps—brown triangles. Homosexuals were identified with pink triangles and Jehovah's Witnesses with purple ones. Non-German prisoners were identified by the first letter of the German name for their home country, which was sewn onto their badge. The two triangles forming the Jewish star badge would both be yellow unless the Jewish prisoner was included in one of the other prisoner categories. A Jewish political prisoner, for example, would be identified with a yellow triangle beneath a red triangle.
The Nazis required Jews to wear the yellow Star of David not only in the camps but throughout most of occupied Europe.