Movies that had diverse casts consisting of at least 51 percent people of color had the greatest return on investment at the box office, a new study from UCLA finds.

The Hollywood Diversity Report, which was published Thursday by the UCLA College Division of Social Sciences, found that among the top 200 grossing movies of 2017, movies that had casts that were between 31 to 40 percent minority actors earned the most at the box office. And those with casts that had a majority of non-white actors provided the greatest return on their budgets at the box office, as they generally cost less to make than other top films.

The report also found that minority ticket buyers accounted for the majority of ticket sales for five of the top 10 grossing films in 2017.

Also Read: Female Protagonists in Top-Grossing Films Hit All-Time High in 2018 - Yet Men Still Dominated

“Every year the data have shown that film and television content that feature diverse casts typically make more money and enjoy higher ratings and audience engagement,” Dr. Darnell Hunt, one of the authors of the report, said in a statement. “We feel confident our partners in Hollywood today see the value of diversity in ways that they did not before we began sharing our report.”

The report was authored by Hunt, Dr. Ana-Christina Ramón and Michael Tran at UCLA.

However, the report also found only incremental improvements in representation for minorities on screen and off. The number of minority actors with lead roles in films increased from 13.9 percent in 2016 to 19.8 percent in 2017, but the report notes that it’s still far from the overall makeup of the country’s population, which is about 40 percent people of color.

Also Read: Spike Lee's Stance on Diversity Is the Same Since #OscarsSoWhite: 'It's Always Going to Be Iffy'

Further, only 12.7 percent of the top 200 films in 2017 were directed by minorities, unchanged from 2016. And the number of writers for the top films was also relatively unchanged between the years, hitting just 7.8 percent.

“We’ve seen modest advances when it comes to movies and films,” Ramon said in a statement. “But deep-seated power systems — dominated by white male decision-makers at the highest levels — are hard to break. The kind of structural change necessary for a new order of business in the film industry has yet to happen, and pushing for it will require sustained vigilance and awareness.”

The study also analyzed diversity in television, in which minorities made up 16.5 percent of the creators of digital-scripted shows, which was essentially unchanged between 2016 and 2017. But minorities held 21.3 percent of lead acting roles in scripted-digital programming, a significant jump from the 12.9 percent tracked in last year’s report.

Also Read: 'High Flying Bird,' Colin Kaepernick and 'The Revolt of the Black Athlete'

Among white, black and Asian-American TV viewers, ratings for broadcast-scripted programs were highest when the shows’ casts were made up of between 31 and 40 percent minority actors. Among Latino households and viewers ages 18 to 49, the broadcast-scripted shows that had the highest ratings were those with casts that had between 11 and 20 percent minority actors.

The report noted that the larger breadth of content on Netflix, Hulu, Amazon Prime and other streaming services has created greater opportunity for both gender and racial diversity on screen.

“It’s clear the increased number of original programs alone has helped grow the share of the pie for minorities and women,” Hunt said.

As for how female directors and creators fared in the study, the total number of female directors in film doubled between 2016 and 2017, accounting for 12.6 percent of all the films directed by females, but in an early look at films from 2018, the report found that gain may have only been a one-year blip. It also found that females held 32.9 percent of lead acting roles in movies, up from 31.2 percent in 2016, but still far short of their share of 50 percent of the overall population. And female roles in lead parts on cable scripted shows went down incrementally to 43.1 percent from 44.8 percent the prior year.

Find the full report here.