*Will.i.am says a combination of his eccentric clothing and musical talent ”kept him safe” from gangs and drug dealers when he was growing up in Los Angeles.

The Black Eyed Peas star says he poured it on thick with the colorful outfits so that no one would mistake him for a gang member.

”I took safety in dressing up so people knew me to be different. The louder you dressed, the more obvious it became that you weren’t in a gang,” he told Now magazine. ”My attire got me through. I used to rap because it kept me out of trouble. It kept me safe.”

The R&B producer – who is currently a judge on the UK version of “The Voice” alongside Jessie J, Sir Tom Jones and Danny O’Donoghue – admits most of his childhood friends are now ”dead, in prison, on drugs, or have sold drugs.”

Despite his success, the artist says he’s determined to stay down-to-earth and relies on his mother Debra Cain – who raised him as a single parent – for advice.

”My ex-girlfriend cheated on me. But then my mom told me off for wanting to dump her,” he said. “She said the girl ain’t a ho and if she cheated I obviously did something wrong. She told me, ‘I didn’t raise no loser and someone who runs away from their problems.’ ”