A man attacked police officers at Ninewells Hospital where he was being abusive.
Nadeem McGonagle drew blood from an officer by scratching his skin.
In a separate incident, he threw a box at an employee of the Ann Summers store on Reform Street.
McGonagle said during both incidents that he was being discriminated against for being mixed race.
Dundee Sheriff Court heard police were investigating another matter at Ninewells on January 27 but were asked to assist with an abusive McGonagle.
During a struggle, McGonagle, of Mary Slessor Square, dug his fingernails into PC Neil Hunter while shouting that officers were “white *******”.
Then on Thursday, McGonagle attended the Ann Summers shop where he was seen by staff touching and feeling bras.
When approached by a staff member, McGonagle said: “Of course I’m ****** alright. I just wanted to have a ******* look.”
McGonagle refused to leave and threw a box at the member of staff, which they avoided, before verbally abusing another staff member.
Appearing from custody, the 32-year-old pleaded guilty to two separate complaints.
Defence solicitor Theo Finlay said McGonagle suffered from mental health issues.
Sentence was deferred by Sheriff Jillian Martin-Brown until May 3 for reports. McGonagle was bailed.