A convicted sex offender who had just completed his required weekly registration with Chicago police boarded a CTA bus outside police headquarters and sexually assaulted a 4-year-old girl sitting with her mother, Cook County prosecutors said Friday.

"For you to do that on a CTA bus with the child's parent on that bus tells me you are in fact a danger to yourself and society," Judge Maria Kuriakos Ciesil said while ordering Judex Colon, 32, held without bail on a charge of predatory criminal sexual assault of a victim under age 13. The Class X charges carries a sentence of 6 to 30 years in prison on conviction.

Colon was convicted in 2008 of sexually abusing two girls while working as a carnival-ride operator in Indiana, prosecutors said.

A police booking photo showed Colon, who was arrested Wednesday, wearing an orange T-shirt that read, "You have the right to remain silent. Anything you say will be misquoted and used against you."

He appeared to be wearing the same shirt under a black hoodie in court Friday.

Prosecutors said that after registering at police headquarters Tuesday morning, Colon boarded a northbound CTA bus on Ashland Avenue. The mother entered the bus with her daughter and a son at a stop at Polk Street, prosecutors said.

Colon, sitting next to the girl, fondled and assaulted her under her clothes, said Assistant State's Attorney Sarah Karr, calling the attack "brazen."

The girl told her mother what had happened when they arrived home, according to the prosecutor.

After his arrest at his Northwest Side home, Colon admitted fondling and sexually assaulting the girl, according to Karr.

Colon was required to register as a sex offender after pleading guilty in Indiana to sexually abusing two girls who had been riding a Ghost Pirates ride at the Lake County Fair in 2007, according to prosecutors and published reports.

In 2013, Colon pleaded guilty in Cook County to failing to register as a sex offender and was sentenced to two years in prison, court records show.