Grant Gustin as Barry Allen in “The Flash.” (Jack Rowand/The CW)

For a long time, most prominent television shows have drawn their dramatic juice from the idea that all characters have big, bad secrets. The waste management consultant who is really a mobster has a wife who is having a discrete emotional affair with his bodyguard. If a prisoner of war returned to the United States is a sleeper agent who plans to kill the vice president of the United States, of course the CIA agent investigating him must have bipolar disorder. Ambitious U.S. congressmen kill alcoholics in their cars and have threesomes with their Secret Service protection.

If these double lives were interesting, their proliferation sapped the power of these stories, sometimes irreparably. The idea that darkness was the only sophisticated tone to lend a story made TV feel like a drag a lot of the time, and the prevailing gloom lent a revolutionary air to alternatives like “Parks and Recreation,” which insisted week after week that well-meaning, fundamentally good people could still be engaging to watch on screen, and that audiences genuinely wanted to root for someone.

It is one thing for a dogged little comedy to make that argument. But, delightfully, two of fall’s best new dramas have taken up the charge. “The Flash” and “Jane the Virgin” are running creative laps around their grimmer competitors by demonstrating that the conflicts produced by good intentions are just as gripping as the misdeeds of people who conceal their worst selves rather than conquering them.

“Jane the Virgin,” as Margaret Lyons described it, is “a telenovela on the CW, and it’s about a pregnant virgin who, thanks to a distracted gynecologist, was accidentally inseminated with the sperm of a rich, unhappy hotelier, Rafael. You know, dramz.” But what distinguishes “Jane” from its competitors is not just its tone and its willingness to be slightly antic, but something that makes it different from other telenovelas as well: The show is constantly encouraging us to give all of its characters the benefit of the doubt.

And I mean all of its characters. Jane Villanueva (the marvelous Gina Rodriguez) is an easy sell. As the title suggests, she is a virgin (but not a prude) who is trying to make the best of her surprising situation, balancing the needs of her fiancé Michael (Brett Dier) with those of hotel magnate Rafael (Justin Baldoni), whose child she is carrying (he had cancer and Jane’s pregnancy is his last chance to become a father).

But “Jane the Virgin” extends that charity to characters who are doing less-well. Xiomara (Andrea Navedo) turns out to have concealed the identity of Jane’s father, Rogelio (Jamie Camil), now a successful telenovela star out of fear Rogelio would try to claim custody. Rogelio, by turn, seems like a pompous goat, but he’s profoundly afraid of wrecking his fledgling relationship with the daughter he only recently learned he had. Rafael turns out to be a former playboy who is afraid of losing the substantive career he built for himself. And while his wife Petra (Yael Grobglas) was cheating on Rafael with his best friend, who in grand telenovela style is murdered via ice scuplture, “Jane” even manages to give her some pathos in the form of lost happiness and an impossible mother.

“The Flash,” which also airs on the CW, is a spin-off of a typically dark superhero show — albeit one with redeeming character work — “Arrow.” But unlike tortured billionaire Oliver Queen (Stephen Amell) in the predecessor show, “The Flash” centers on Barry Allen (Grant Gustin), a cheerful scientist who works as a crime scene investigator.

There is tragedy in Barry’s past: His mother was murdered when he was a child, and his father, who Barry believes is innocent, was incarcerated for the crime. But unlike so many other superheroes (including Oliver), Barry is not defined solely by his tragedy. He has a close relationship with Joe West (Jesse L. Martin), the detective who raised Barry when his father went to jail, and Joe’s daughter Iris (Candice Patton). When he acquires superpowers, Barry’s reaction is exuberant and joyful. If you suddenly became the fastest man in the world, wouldn’t you want to take your new skills out for a spin?

This being a crime series, “The Flash” does not bother to try to make everyone sympathetic. And trouble is surely brewing in the form of Dr. Harrison Wells (Tom Cavanagh), Barry’s patron, who proves to have a nasty temper in private.

But at its best, “The Flash” is fair and kind about the mistakes people make when the stakes are as high as they inevitably are when superpowers are involved. In one episode, Barry finds himself under attack from an adversary with a weapon that can slow him down, and that turns out to have been designed by Cisco (Carlos Valdes), part of Barry’s support team. Cisco’s sad confession that he was afraid and the weapon was his way of handling his mistrust of what Barry might do or become lands harder than a high-speed punch.

There is evil in the world, of course. And I am glad that television has proved itself capable of addressing the big questions that once might have been reserved for film and literature, if they were considered suitable for fictional treatment at all. But now that showrunners have demonstrated that they can plumb the worst of humanity, and then imagine even deeper depths, it is delightful to see others set their hands to a task that others have ignored: exploring niceness and kindness in all of its texture. There is just as much to see in the sunshine as in the darkness.