New York City was the last and eighth city to be the capital of the United States before the Constitutional Era. The flag's colours are based upon the city flag of New York City and the design of the current Capital City Flag of the United States - Washington DC. Also note that the colours from New York City's flag harken back to colonial colours of the Netherlands, since the Dutch were the first European peoples settle in New York, or as it was known back then as New Amsterdam.
On January 11, 1785 New York City became the capital of the United States at Fraunces Tavern. It was the last meeting point of America 1.0 under the Articles of Confederation that took place on March 2, 1789 with Philip Pell in attendance. Likewise New York City was the first capital of the United States under the US Constitution - America 2.0.
It was during the 'capital reign' of NYC that the North West Territories were forged in freedom, with the abolition of slavery, forever and everafter.