When Linda Lowy was casting the pilot for “Grey’s Anatomy” more than a decade ago, she had only one edict from creator Shonda Rhimes regarding skin color — Miranda Bailey had to be white. Rhimes envisioned the character as a petite blonde whose mousy frame would contrast with a fierce intellect and fiercer demeanor, both of which would intimidate the show’s young doctors in training. Kristin Chenoweth tested for the role. But then Lowy saw a taped audition from an African-American actress named Chandra Wilson.

“I didn’t see anything other than the character,” Lowy says. “I took it out of the machine — it was a VHS tape then — and I walked down to Shonda’s office and I said, ‘You have to look at this.’ We were both flabbergasted.”

Wilson is now in her 13th season on “Grey’s.” When the show premiered, the broadcast-network diversity departments born out of an NAACP boycott were not quite five years old. Now broadcasters such as ABC tout their onscreen diversity as a point of pride. But inclusion in Hollywood isn’t entirely a rosy picture: Studios such as Marvel have been forced to defend themselves vigorously against charges of whitewashing in their films.

That transition of diversity from the back burner to the hot stove has changed the way that casting directors operate. And the diversity conversation has since become more nuanced — broadening beyond questions of simply black and white.

“I feel like ‘Grey’s Anatomy,’ in many ways, and ‘Scandal’ after that, and ‘How to Get Away With Murder’ after that — we sort of changed something,” Lowy says. “We moved something a little bit in the right direction.”

That direction is one in which diversity is at the forefront of the casting process. “Once it gets to a person like me, the conversation turns right away to diversity, because the heads of the studios are looking to diversify their casts and not to have a lily-white first three people on the call sheet,” Lowy says. “You need somebody in there of color.”

That effort appears to be bearing fruit. GLAAD’s annual Where We Are on TV survey found last year that black characters accounted for 16% of all series-regular roles on broadcast in the 2015-16 season — the highest percentage in the survey’s 11-year history. Hispanics accounted for 7% of all television roles, including America Ferrera’s lead character on the NBC comedy “Superstore,” which the network backed with a big marketing push heading into its second season, including a special post-Olympics episode.

“To create a successful show on network television, the largest possible audience needs to be able to relate to the characters and stories, and that audience is made up of people from all different backgrounds and experiences.” Jennifer Salke, president of NBC Entertainment

“To create a successful show on network television,” says Jennifer Salke, president of NBC Entertainment, “the largest possible audience needs to be able to relate to the characters and stories. And that audience is made up of people from all different backgrounds and experiences.”

The expansion of scripted programming across multiple networks and digital services has also created more casting opportunities for actors of color.

“If you look at Amazon and Netflix and Hulu,” says Christine Kromer, casting director on Starz’s “Power,” “there are so many more shows being made and so many more opportunities for diverse actors.”

But the proliferation of scripted entertainment, particularly on television, has also stretched thin a talent pool that for years was inadequately supported by the industry. Casting directors complain of a dearth of experienced middle-aged and older actors of color.

“The competition for talent, just because of the numbers, is crazy right now,” says Sharon Klein, executive VP of casting for Fox Television Group.

Lowy agrees. “If you need a 40-year-old, super-handsome Latino fellow, it’s hard. You’ve definitely got to look in other countries. You’ve got to look in South America. Most of them are going to be taken here.” But, she argues, the effort is worth it, and the next generation will be encouraged to stay in the business by seeing themselves represented on screen, and finding more work in their 20s than their predecessors were able to.

But along with praise for efforts toward greater onscreen inclusion have come charges of whitewashing. Paramount’s “Ghost in the Shell” has been criticized for placing Scarlett Johansson as the character dubbed Motoko Kusanagi in the original Japanese manga and anime. Marvel took heat on social media for casting Tilda Swinton in “Doctor Strange” as the Ancient One, portrayed in the comics as an Asian man, and Finn Jones as Danny Rand in Netflix’s “Iron Fist,” despite an online campaign to have that character played by an Asian actor. Marvel Comics writer Marjorie Liu tweeted after Jones was announced, “Iron Fist is an orientalist-white-man-yellow-fever narrative. Asian actor would have helped subvert that offensive trope, and reclaim space.”

Marvel denies that it was whitewashing Swinton’s character. They say that the Ancient One is represented by many different people and ethnicities and was never intended to be exclusively Asian. Meanwhile, the producer of “Ghost in the Shell” says the film is set in an “international world” instead of unfolding in Japan, as it does in the comic book.

Marvel has tried to be more responsive to demands for greater inclusion in its upcoming projects. “Black Panther” features a largely African-American cast and is directed by a black man, Ryan Coogler, while Netflix’s “Luke Cage” is the first superhero show with a black protagonist.

Indeed, diversity efforts have expanded to include greater emphasis on gay, transgender, and disabled performers and characters. This fall has seen ABC premiere “Speechless,” a family comedy whose central character has cerebral palsy — as does Micah Fowler, the actor who plays him. Later this season, CBS will premiere “Doubt,” which will star Laverne Cox as the first transgender series regular on broadcast TV.

At the Primetime Emmy Awards in September, “Transparent” star Jeffrey Tambor said he hoped to be “the last cisgender male playing a transgender female.” Cox later took the stage and implored the industry to give trans actors more opportunities. Peter Golden, executive VP of talent and casting for CBS, says that in years past, casting a cis actor as a trans character would have been the norm. “I think eyes have been opened in the last five to 10 years, and because of that the trans community of actors has grown tremendously,” Golden says.

TV series now aim for greater inclusivity among their casts, including (from left) “Speechless,” “Doubt,” and “Superstore.”

Russell Boast said he hadn’t realized how much of a divide existed between Hollywood and various communities until he was asked to cast a transgender role on ABC’s “Wicked City.” “I went on the hunt, and no one knew who to go to,” says Boast. “It was so disorganized.”

Boast, who serves as vice president of the Casting Society of America, got inspired to try to better integrate transgender and disabled actors, and other underrepresented groups, into the casting mainstream. He and other members of the organization began offering free classes and seminars this year, aimed at giving actors a primer on how they should audition and network.

“I thought we’d get 30 actors, and more than 80 people showed up,” he recalls. “We were having all these conversations about diversity, and I just thought it was important to stop talking and start doing the work.”

Nick Adams, director of programs and transgender media at GLAAD, attended one of the free seminars. He was impressed by the exchange of ideas that took place over the course of eight hours, as casting directors explained their process and transgender actors raised concerns about the roles that were being made available to them.

“There were a lot of nuances that surfaced,” says Adams. “One of the issues that came up was if they would cast transgender people for any role. There were also questions about who ‘looks’ transgender and who doesn’t ‘look’ transgender and how that impacts the parts that people play.”

The social media campaign #OscarsSoWhite shamed Hollywood for its poor track record of promoting diverse talent both in front of and behind the camera. People who took to Twitter were primarily galvanized by the lack of recognition for actors of color at the Academy Awards, but by tweeting and sharing their outrage, they drew attention to a business that remains stubbornly monochromatic and male-dominated.

The statistics are stark. American society is multicultural, transgendered, bisexual, homosexual, and majority female, just not on film or television. A blistering report by USC’s Annenberg School for Communication and Journalism branded Hollywood “the epicenter of cultural inequality” and found that women comprised just over 30% of the 4,370 speaking or named characters in the top 100 grossing films last year. Forty-nine of 2015’s biggest movies had no speaking or named Asian or Asian-American characters, 17 lacked major black characters, and 82 featured no lesbian, gay, bisexual, or transgender characters.

Neither are people in wheelchairs, or the deaf and blind, reflected in the roles Hollywood provides. A recent study by the Ruderman Family Foundation found that 95% of roles that depict characters with disabilities on television are played by able-bodied actors, while the USC study reports that of the top 100 films, 45 films included no characters with disabilities. This, despite the fact that disabled people make up 20% of the population.

But casting directors report that all the dialogue is leading to change. Studios have begun to stress the need to include multiple ethnicities or more in-depth roles for women in their blockbusters. It helps that films such as those in the “Fast and Furious” franchise, which have Hispanics, Asians, and African-Americans in their casts, have seen their audiences broaden as a result of the diversity. Likewise, last summer’s “Bad Moms” and last year’s “Fifty Shades of Grey” proved that women will turn out in force for the right material. That commercial success is prompting studios and the creative community to broaden their definition of diversity.

“It started with actors of color, and that just opened up the door further for all inclusion,” says Cindy Tolan, casting director for “Straight Outta Compton.” “Everybody wants to see themselves on screen. Everybody needs a voice or wants a voice, and people will pay to see themselves represented.”

Marci Liroff has served as the casting director on the likes of “E.T. The Extra-Terrestrial” and “Insomnia,” and helped teach the CSA seminars. She thinks that her profession has to do more to furnish opportunities to disabled and transgendered performers, and to others.

“It can’t just be about what’s written on the page,” says Liroff. “If we’re doing our job, we have to think that if a part is written for a man, maybe we should try it with a woman. Or maybe that funny kid can be played by an actor in a wheelchair.”