California does an odd Kabuki dance in its prisons, where racial animosity and gang violence are among the worst in the nation.

The courts have made it clear in multiple decisions that inmates cannot be managed based on ethnicity, a point reiterated in a recent opinion (pdf) by the state First District Court of Appeal which also made clear that prisoner lockdowns to separate inmates on the basis of ethnicity were OK if not done “preferentially” and on a “short-term emergency basis.”

While prison officials say lockdowns are based on gang affiliation, not race, former Department of Corrections and Rehabilitation (CDCR) Secretary Matthew Cate has said they are virtually the same in California prisons because even the nongang-affiliated prisoners don’t want to be on their own.

Officially, the state’s policy is that lockdowns are not conducted along racial lines. ProPublica, however, notes that the Corrections department has admitted in documents (pdf) “that the CDCR policy is that when there is an incident involving any race, all inmates of that race are locked up.”

The ACLU says that California is the only state in the nation known to initiate lockdowns based on race. An analysis by the public-interest group Prison Law Office indicated that nearly half of security-based lockdowns in California prisons between 2010 and 2012 were aimed at specific racial or ethnic groups.

And then there are those pesky signs above cell doors in a number of prisons―color-coded white for whites, red for Southern Hispanic, Green for Northern Hispanic, blue for blacks and yellow for Other, who are mostly Asian.

The signs are mentioned in the January Court of Appeal decision that affirmed prohibitions against broad race-based solutions to prison problems, citing a 2005 decision by the U.S. Supreme Court that government officials can’t “use race as a proxy for gang membership and violence without demonstrating a compelling government interest and proving that their means are narrowly tailored” to advance that interest.

“I haven’t seen anything like it since the days of segregation, when you had colored drinking fountains,” Prison Law Office attorney Rebekah Evenson told ProPublica.