Kenya Barris, creator of ABC’s “black-ish,” was motivated to write the comedy about an African-American family’s efforts to honor its heritage in part by the unreality of what he grew up watching on television.

“I saw ‘Friends’ and ‘Seinfeld’ and thought, ‘What part of New York is this?’” recalled Barris, who is black. “It’s not about being diverse. It’s about being true to the world.”

His show comes 15 years after civil rights groups, galvanized by a lineup of new network series almost entirely devoid of minority characters, sought and ultimately won agreements from major broadcasters to put programs on the air that better reflect the nation’s population.

An AP analysis of regular cast members of prime-time comedies and dramas on ABC, CBS, NBC and Fox found progress since then in hiring black actors, but slighted other minorities. Casts at three of the four networks are still whiter than the nation as a whole.

That’s in contrast to a fall season that seemed to signal broad change. Besides “black-ish” and a trio of shows from black megaproducer Shonda Rhimes, it offered Asian-American crime fighters and Latino families.

Among the key findings of the AP analysis:

— ABC, NBC and Fox now have a higher percentage of blacks in prime time than there is in the general population — a significant change over 1999. The difference is most dramatic at Fox: 6.5 percent of characters in lead or supporting roles were black in 1999 to 21 percent black this past fall, a number that notched up again with January’s premiere of the black drama “Empire.”

— Other ethnic groups don’t do nearly as well. While Latinos are the nation’s largest minority group at more than 17 percent of the population, only Fox and ABC have Latino representation of as much as 10 percent.

— CBS, the nation’s most popular network, had the most diversity 15 years ago and now has the least. CBS programs are whiter now than they were then.

Time has not made broadcast’s role moot. Network fare remains dominant for most consumers despite the broad array of alternatives. What Americans see — or fail to see — has a powerful impact on how individuals regard themselves as part of the nation’s mosaic.

Gina Rodriguez, the Golden Globe-winning star of the CW’s new telenovela-inspired comedy, “Jane the Virgin,” knows what it’s like to be left out of the TV picture.

“Ten years ago, when I was looking at that screen and didn’t see myself at all, I knew there was no place (for me),” she said.

TV history contains minority success stories. Desi Arnaz loved Lucy in the 1950s; The “Roots” miniseries set viewership records in the 1970s; and Bill Cosby was TV’s father figure in the 1980s. But by the fall of 1999, ABC, NBC and Fox each had prime-time casts that were 86 percent white — at a time the U.S. Census put the non-Latino white population at 71.9 percent.

In fall 2014, with the non-Latino white population estimated at 62.6 percent, CBS’ series cast and characters were 79.2 percent white; ABC’s were 72.7 percent; and NBC’s were 69.7 percent. In contrast, Fox’s slate stands at 60 percent white.

The Census Bureau counts blacks as 13.2 percent of the U.S. population. Blacks make up 19 percent of cast members in fall shows on Fox and 15 percent on ABC and NBC.

Although CBS pledged improvement in 1999, the number of white characters on its fall 2014 series was up and black representation had slipped to just under 7 percent, less than half what it was in 1999, according to the AP’s tally from the network’s own cast lists.

“We are victims of our own success to a certain extent,” CBS Entertainment President Nina Tassler said. The network has been the most-watched in prime time for much of the past decade and, as a result, has had less programming churn.

CBS, which does have prominent minority stars including Asian actresses Maggie Q in the lead role on “Stalker” and Lucy Liu on “Elementary,” is not complacent about the issue, said Tassler, who is Latina.

Jennifer Salke, NBC’s entertainment president, says shows with all-white casts “would just never fly” at NBC: All 13 of the network’s scripted shows this fall had at least one minority cast member.

None of the minority cast members on those shows, however, enjoy marquee status: Alfre Woodard is the U.S. president on “State of Affairs,” but the show’s star is Katherine Heigl. On ABC, which has a nearly identical percentage of blacks on the air as NBC, Kerry Washington of “Scandal” and Viola Davis of “How to Get Away With Murder” are the leads.

People who follow the issue say a key way to boost a minority presence onscreen is to step it up off-screen. But too often that isn’t part of the equation. Recent studies have shown the extent to which whites are dominant as writers and directors.

Still, Jason George, an actor who works on diversity issues for the Screen Actors Guild, said he’s seen progress with minority actors getting more well-rounded roles.

“You’re suddenly a person and not just a representative of a culture,” he said. “As an actor, that’s what you want.”