NEW YORK — Herb Van Gent points his infrared gun at a square of still-unpainted gray shingle and clicks the trigger. He gets an immediate temperature reading: 143 degrees and rising. Then he aims it five feet away to a square of roof I have just painted: 98 degrees and decreasing.

He smiles.

“A 45-degree difference and we’re only on the first coat,” he says. That means it also will be cooler inside the building, saving energy, he says.

It’s 11 a.m. and we are on the roof of a New York City retirement home, rolling out a thick, shiny white paint. Van Gent is one of a volunteer group that has come to paint the roof as part of a city-sponsored “cool roof” program.

The idea of painting roofs white is catching on across the country; Energy Secretary Steven Chu has said it could help in the fight against global warming.

“Cool roofs are one of the quickest and lowest-cost ways we can reduce our global carbon emissions and begin the hard work of slowing climate change,” Chu said in July, while announcing that Energy Department buildings would be painted white wherever possible.

Although white roofs keep homes cool in summer by absorbing less heat, they have little impact on winter heating bills, according to the Cool Roof Rating Council, a nonprofit group created in 1998 to research and implement the technology. That’s generally because the sun is less intense in winter, the group said, and less important as a heat source. The roofs do not let any more heat escape than other roofs, it said.

In Arizona, cool roofs are mandatory for state and state-funded buildings, while Philadelphia has an ambitious green-energy plan that put cool roofs at its center.

In New York, with Mayor Michael Bloomberg’s blessing, the Department of Buildings and other public and private groups have vowed to paint 1 million square feet of roof on city-sponsored community buildings. Organizers have advertised on Craigslist for volunteers, promising that the painting is rewarding and fun.

I decided to give it a try.

There were a half-dozen volunteers on the roof that day from Wayne, N.J.-based GAF Materials, which supplied the reflective white paint. Among them was technical specialist Steve Hecht, who showed me how to spread the paint.

“This should bring the temperature down 50 or 60 degrees,” Hecht said as I rolled a coat onto one small area.