Kavod Ha Briyot - in The Shulkhan Arukh

In The Shulkhan Arukh

The Shulkhan Arukh, a seminal code of Jewish law, used a dramatic example to illustrate its holding that kevod habriyot does not override Biblical prohibitions. It held that an observant Jew who becomes aware of Biblically prohibited clothing should remove it immediately even if it leaves a colleague naked in a public place, illustrating that biblical prohibitions trump even strong considerations of modesty and even great public embarrassment.

The Halakha in the Shulkhan Arukh goes according to Rav:

Shulkhan Arukh, Yoreh De'ah 303:1 " Permissible to remove kilayim from friend even in marketplace:

: One who sees kilayim of (forbidden by) the Torah on his friend even if they were walking in the marketplace jumps upon him and tears it from upon him immediately even if he was his rabbi
: And there are those who say that if had worn them in error then he does not need to tell him about it in the markerplace because of Kevod HaBriyot he remain silent and not remove it it due to error (Tur in the name of the Rosh)
: And if it was by the words (divreihem) he does not tear it from him and he does not remove it in the marketplace until he arrives at home
: And also (likewise) in the Beth midrash there is no need to hurry to leave (Tur)
: But if it was from (forbidden by) the Torah he removes immediately.

Read more about this topic:  Kavod Ha Briyot