Change comes quickly to the fashion world these days, as it seemingly does in every facet of a pop cultural universe driven by the latest viral trends.

So it was that celebrities started heaving rainbows last fall on Snapchat, birthing a new phenomenon, the fashion company Terez took notice.

Best known for its emoji leggings, the Garment District-based business got straight to work. Within a month, their rainbow tees inspired by the trend became a hot fashion accessory.

The company, which is based on Eighth Avenue and 38th Street, says it could not have turned out their product with such timeliness if it had to rely on offshore manufacturing: “We figured a way to capitalize on that in a really unique way and get it out,” said COO Jonathan Goldberg.

And while a premium is paid to produce in NYC, to a growing number of designers the benefits offered by the Garment District outweigh the slightly higher costs of doing business.

“From sourcing trims and labels across the street, to cutting and sewing around the corner — the Garment District has such rich levers for an up and coming brand that we really try and work with each and every day,” Goldberg said.

While the pulse of the Garment District may be weaker than in the past — nonprofit Save the Garment Center says while 95% of the nation’s clothes were made in the district in 1960 that number has dropped to 3% today — the companies that drive local fashion production are working hard to strengthen the community.

Terez is one of a growing number of companies passionate about nourishing the local industry. Other young labels, including Romeo Hunte and Pamplemousse join longtime loyal fashion designers like Yeohlee Teng, who has housed her brand built around sustainability in the Garment District since the early ’80s. Optimistic about the future of her longtime professional home, Teng says its continued viability will depend on designers staying local.

“The center has shrunk a little bit, but there are still a lot of people making things locally, and hopefully it’s something that will continue as long as the schools fuel really great designers and they stay in the city and create new businesses,” Teng said.

Boosting the effort in recent years is a new generation of conscientious designers committed to remaining fully in control of the process, avoiding the sort of wasteful and unnecessary environmental costs of doing business in far-flung locations, while taking advantage of the resources built up over generations.

“There seems to be a new group of designers growing up around the notion of sustainability and designing in a responsible way, not only in terms of what they do with labor but what they do with the materials that they use for the designs,” said New-York Historical Society Vice President Valerie Paley. “This is a new movement.”

In 1987, the city rezoned selected midblocks between West 35th and West 40th streets west of Broadway to keep the clothing manufacturing facilities safe from over-development. Community groups contend that the zoning hasn’t stopped several high-rises, chain stores and other businesses from bypassing the regulations, and have called on the city to take more action.

Nanette Lepore, who has been based in the Garment District for more the 20 years, encourages new designers to stay local.

“For young designers they are way better off doing it locally. ... To me, It’s much more painful to do it overseas than do it in our backyard.”

Aside from having offices, fabric designers and other components within a short distance from the factories, Lepore says there is a learning component that only the Garment District can offer. “You have this built-in mentorship with these factories,” she says. “When you’re [in the factory] and have a problem and stand next to the person who is running the factory, you’re going to be helped. ... Having hands on control can make or break a company.”

Lepore is one of the driving forces and most recognizable names behind the Save the Garment District campaign. She says the city is doing their bit, too, and recognizes the value in supporting an industry which represents 30% of all manufacturing jobs in NYC and generates $2 billion in tax revenue.

In 2015, the NYCEDC and Council of Fashion Designers of America (CFDA) launched the Fashion Manufacturing Initiative (FMI), which provides grants to local production facilities to upgrade equipment and technology and offers employees skills training. It also launched new business development opportunities for grant recipients, such as free industry trade show participation and CFDA open houses. “To date, the FMI has awarded $2 million in grants to 19 of the City’s fashion production companies,” said Kate Daly, senior vice president at NYCEDC.

It’s crucially important work, Lepore said, and the future of one of the industry fueling one of New York City’s most iconic neighborhoods depends on it.

“If you keep this garment sector active and alive you keep the dream of designers who may not have the cash but have the passion,” Lepore says.

(With Wendy Lu)