Tiler Peck and Robert Fairchild of the New York City Ballet in George Balanchine’s “Who Cares?” (Paul Kolnik/New York City Ballet)

If there’s a common thread in George Balanchine’s “Who Cares?” and Jerome Robbins’s “West Side Story Suite,” it’s the unmistakably hopeful tone that permeates both classic dances.

In the Balanchine, that characteristic manifests as sunny optimism, and in the Robbins piece as naive romanticism, but each work is driven by an undercurrent of the promise of something better.

It was these spirited ballets, along with Peter Martins’s “Fearful Symmetries,” that New York City Ballet presented Tuesday in its opening-night program at the Kennedy Center.

“Who Cares?” rollicks through the show-tunes catalogue of American composer George Gershwin. The work, which debuted in 1970, is an ode to New York — the glitzy, anything’s possible version of the city that has been idealized in film, music and theater for decades.

Against a backdrop of an urban skyline under a sprinkling of glittery stars, the dance opens with a bevy of women in candy-colored costumes mingling with a group of dandily dressed gentlemen. The men were gallant from the start, and their ensemble section, “Bidin’ My Time,” is equal parts whimsy and boldness. The women were appropriately flirty, but their formations got a bit muddy at times, and one wished that their high leg extensions had more crispness or their feet would strike their intended positions with more clarity.

This work’s most affecting moments are the ones the company has entrusted to principal dancer Tiler Peck.

Although line and shape are critical to the Balanchine style, it’s what Peck does in between those poses and positions that makes her dancing so singular. In “The Man I Love,” she prowls backward on a long diagonal toward her duet partner, Robert Fairchild. It’s only a walk, but the slight sway of her hips, the tension in her chest and her lowered brow instantly reveal everything we need to know about her character: This is a woman longing for the man she passionately loves.

Peck also seems to have an impeccably tuned internal compass that tells her when to summon her virtuosity and control and when to throw those assets to the wind. In a solo section, “Fascinatin’ Rhythm,” she’s able to polish off a difficult cross-stage pirouette sequence because her positioning is so precise that it allows her to reach maximum speed without sacrificing any musicality. But in the duet with Fairchild, the way she swoons into his arms is wholly uncalculated — it’s purely (and rightly) emotional.

“West Side Story Suite” is composed of excerpts of dance sequences from the iconic 1957 musical. As the Sharks, the Jets and “their girls,” as they’re dubbed in the program, the dancers manage to shelve the glossy sheen of the evening’s first work and commit to the coarser, more lifelike sensibility that this one demands. The dips, lifts and catches in the partnered sequences are sensual and youthful. And during the gang face-offs, the men’s jumps are characterized by the reckless abandon one expects from a violent street crew.

For the most part, the snippet format is successful in telling the story. A drawback of this setup, however, is that the love story between Maria and Tony is no longer the production’s center of gravity. The drama of the fight scenes and the splashy sex appeal of Anita and her girlfriends take on outsize importance.

“Fearful Symmetries” has the feel of a lead foot on a gas pedal. Like the John Adams score of that name, to which it is set, it propels forward relentlessly in a way that is exciting and even a little dangerous. Martins has constructed the dance so that even small details feel incredibly important. When a single man comes bounding through a row of women, it’s the swell in the music at that moment that makes us take notice.

There are many movement phrases here that please the eye, but as a whole, the dance is not especially original. Furthermore, its denouement is too long, and its switch from barreling bravura in the beginning to slow reconciliation at the end feels jarring, not refreshing.