Within weeks, Times Square’s topless painted women, costumed characters and other tip-seeking hucksters could be legally corralled inside colored-pavement pens, under legislation Mayor Bill de Blasio signed Thursday morning at City Hall.

Rules being eyed by city planners would ban the hucksters from the sidewalks and newly created “pedestrian flow zones” A draft notice defines the affected areas as being from 41st Street to 53rd Street, and in those zones only continuous foot traffic would be allowed.

The peddlers would be penned into eight city-bus-sized, “designated-activity zones” — and would be committing a crime by continuing to roam free in Times Square, as they do now, seeking tips.

“I think people are going to see Times Square still enjoyable, still fun, but more orderly and more safe,” Councilman Corey Johnson, one of legislation’s prime sponsors, said of the tourist destination, visited by 39 million out-of-towners last year.

The menagerie of characters and “desnudas,” a Spanish word for naked, caused a tabloid stir and a political headache for de Blasio last year. Critics like Gov. Andrew M. Cuomo said the hucksters’ presence was symptomatic of Times Square slipping back into the chaos and grime of the 1980s and early 1990s.

Technically the law de Blasio signed, Introduction 1109-B, gives the city Department of Transportation only the authority to promulgate rules for pedestrian plazas citywide. The department said it would hold a public hearing May 23 at 10:30 a.m. at One Centre St., North Building, Mezzanine, across from City Hall.

Whichever rules the city adopts will apply both to the 53 plazas across the city and the 20 additional plazas in the works.

advertisement | advertise on newsday

At a hearing March 30, Times Square business groups testified in favor of the law but hucksters dressed as such characters as Spider-Man, Batman and the Joker waited for hours in costume to say the bill would hurt their livelihoods.