And when it comes to improving diversity among its outside lawyers, Facebook is part of a growing trend.

A number of general counsels across corporate America are pressing their outside firms to make their teams more diverse — in terms of ethnicity, gender, sexual orientation and even disability — at all levels of seniority, not just among junior associates.

MetLife says it is announcing a new policy this month; HP in February adopted a more stringent program. The moves are an acknowledgment that the numbers of women and minorities at law firms have barely budged over the past 20 years.

“Law is the least diverse white-collar profession,” said Jean Lee, the chief executive of the Minority Corporate Counsel Association, an organization that focuses on the hiring, retention and promotion of diverse lawyers. “A lot of companies made a concerted effort to increase diversity internally, and now they are demanding diversity at the firms they use.”

“One of the challenges in the legal profession is that, despite all of the focus, the lack of diversity is a stubborn and persistent problem,” said Kim Rivera, HP’s general counsel. “We think we can help if we can be clear and unambiguous and hold firms financially accountable.”

HP now requires its outside law firms to have at least one diverse so-called relationship partner or at least one “woman and one racially/ethnically diverse attorney each performing at least 10 percent of the billable hours worked on HP matters.” (A woman who is also a minority will cover the requirements as long as she bills the requisite 10 percent.)

Failure to comply, under the policy, would result in a 10 percent “diversity holdback” of fees, but with a one-year grace period.