Near the end of her amorously hectic life, the French writer Sidonie-Gabrielle Colette, known by millions by her last name, spoke to an interviewer for a documentary. She offered some details of her early middle-class years in Burgundy. Colette’s family home, bright and sun-filled in its backyard gardens but drably respectful up front, sat on a downward-sloping street. This rendered the home’s front steps “wobbly,” as the writer described them.

In a lifetime accommodating three marriages, untold affairs, the Nazi occupation of Paris and so much more, did this woman ever find her balance? Or are some lives, literary or otherwise, meant for perpetual, dizzying motion?

The new film on Colette stars Keira Knightley, in her strongest work in years, opposite an effortlessly witty Dominic West. If you’re wondering whether director Wash Westmoreland’s literary biopic is roughly what you’d expect, assuming you’re expecting a pretty, predictable result, you’re in for a surprise. There’s more going on in “Colette” than tame hagiography; the results are happily vibrant, even if the sexual inequities depicted remain grimly pertinent.

Born in 1873, Colette died in 1954. She was best known in America for her novella “Gigi,” about the courtesan in training, later turned into a Lerner and Loewe screen musical. Years earlier, while working anonymously in her husband’s “factory” devoted to producing his latest literary sensations, Colette ghostwrote the scandalous, semi-autobiographical “Claudine” novels credited to her husband, Henry Gauthier-Villars, also known as Willy.

How did one of France’s 20th-century literary greats pry herself loose from a crummy business deal of a first marriage? To make matters more complicated, the relationship was full of feeling and not without tenderness, even if Willy locked his wife in a room until she met her deadlines.

These few, eventful years present the narrative stuff of “Colette.” Westmoreland developed the script with his husband, co-writer Richard Glatzer, and with Rebecca Lenkiewicz. Glatzer died of complications from ALS in 2015; he and Westmoreland collaborated on the Alzheimer’s drama “Still Alice,” which handed Julianne Moore an Academy Award.

The best decision made on this project came early, in the writing stage. The film presents a central relationship between Colette and Willy far more interesting and nuanced than a mere tale of a young woman who suffers and suffers and wrings her hands until she decides to bail. Fifteen years her senior, Willy is not just a dastard-in-waiting in West’s portrayal; he’s a magnetic egotist and fun to be around. And with Knightley running the show, with a level of confident, relaxed technique she didn’t really acquire until recently, “Colette” draws us in, just as Colette herself is ushered into fin-de-siècle Paris.

As Colette’s life opens up, the possibilities seem limitless, including the protagonist’s dawning awareness of her bisexuality. She’s a born writer and a canny observer of the codified social universe. (Colette was forever a bit of a tourist, not a native.) Her husband, the “slipperiest of eels,” admires her instinct and her writing, but sees no advantage in letting her have her own name on the work she’s producing on his brand’s behalf.

Both wife and husband find themselves attracted to a visiting American in Paris (Eleanor Tomlinson, slyly evoking subtle carnal availability incarnate). Willy finds his way into the American’s bed mostly out of competitive jealousy, since Colette, he learns, got there first. A touch of Feydeau bedroom farce pops up here and there in “Colette,” though director Westmoreland wisely keeps broad comedy at bay.

As Colette decides to divorce and seek her own name on her own works, the film’s tone becomes more serious but the rhythm remains pleasingly urgent. Denise Gough provides the needed gravity as Colette’s cross-dressing lover Missy, with whom Colette toured in theatrical pantomimes. Their onstage kiss provoked a near-riot, a scene naturally included in “Colette.”

There’s a lot missing, too, as is always the case in biopics. The film elides the later marriages, and Colette’s daughter, and Colette’s affair with her teenage stepson. But biopics tend to work better when they don’t fuss around with too much of a given timeline. The marriage on view here, a little ridiculous, a little galling but full of interesting sharp edges, presents Knightley and West with a full array of emotions to explore. The tone remains deceptively light, but it feels both true and in period. (Some, however, may be thrown by the all-British cast speaking English but, in various close-ups, writing in French.)

For the record, costume designer Andrea Flesch’s hats catch the light beautifully. But watching “Colette” I hardly ever focused on the millinery, to say nothing of the haberdashery. I was in it for the people. Not the clothes.

"Colette"

***

Rating: R for some sexuality/nudity

Running time: 1 hour, 51 minutes