WASHINGTON — There was a wistful air to the 39th annual Kennedy Center Honors on Sunday, as the Capitol took a break from preparations for the incoming Trump administration to observe Washington’s cultural event of the year.

Hosting the gala for the third time, Stephen Colbert, the host of “The Late Show” on CBS, saluted President Obama as “passionate, intelligent and dignified.”

“Sir, I don’t know why you stood up,” Mr. Colbert said after an extended ovation for the president. “I was talking about Michelle.”

The celebration’s tone was considerably more political than in previous years, with Mr. Colbert including “endangered swamp dwellers” among the tuxedo- and gown-clad guests he welcomed to the event.

That tone had permeated much of the weekend, dotted with activities before the gala, including an annual, intimate dinner at the State Department on Saturday hosted by the actor Kevin Spacey. Along with another actor, Sean Penn, Mr. Spacey took direct aim at President-elect Donald J. Trump, making him the butt of several jokes.

Many in the room during the dinner were brought to tears when Secretary of State John F. Kerry, without mentioning the president-elect directly, spoke of the significance of the arts in moments of national “turbulence” as a reminder of the human spirit’s “utter refusal to…