From the musical romance of "West Side Story" to the gritty violence of "Colors," youth gangs have long exerted romantic attraction. But in the 1980s, urban gangs dramatize the story of America's invisible society, the underclass.

In Dennis Hopper's movie "Colors," in remarks of police officials from Atlanta to Los Angeles, the message is the same: No longer do switchblades decorate catchy dance numbers; no longer does the game look fun. Instead, decades after the Zoot Suit Riots, years since the Broadway Sharks and choreographed Jets, the carnage of Vice Lords and Playboy Gangster Crips is but one symptom of that wider war zone, the ghetto.It is there, as Bob Ruchhoft, of the Los Angeles Police Department, says that "life has just become awful cheap."

The toll appears massive, with some 387 gang-related killings last year in Los Angeles County alone. Yet these grim numbers hint only at a wider dysfunction: a societal breakdown still little understood, obscured in amorphous vast ghettos utterly different from the American mainstream. In that sense, while the gangs' bandannas and AK-47 assault rifles make glamorous cinema, the desperation and causes of the mayhem emerge only when interpreted as measures of profound social and economic malaise.

And about that, one statistic speaks volumes: In 1985, with the removal of even grunt jobs from the cities by deindustrialization, 43 percent of black male high school dropouts in their early 20s reported earning no money at all; as recently as 1973, the number was just 12 percent. In short, gangs are what's left when everything else is gone.

As observes Dr. Carl Bell, who once ran with the Blackstone Rangers, a street gang, only blocks away from where he now practices community psychiatry on Chicago's South Side: "It's no big mystical thing, though people prefer it that way. If they are shut out, as now, anything can happen."

What exactly does happen, meanwhile, remains fascinating, lurid and widely misunderstood.

"Gangs are simply overwhelming the inner cities," declares Walter Williams, a professor of economics at George Mason University. Irving Spergel, a professor of social services administration at the University of Chicago, suggests a patchy jungle of intermittent chaos. "Gangs," he says, "are increasingly violent but also complex: They're not responsible for every crime, but in certain places, certain areas, they wreak havoc."

Statistics suggest complexity as well. Though most observers agree with Joan Moore of the University of Wisconsin that "something's happening," they generally borrow from the experiences of their own communities, each tendering his own numbers, his own theories. While the New York Police Department Gang Intelligence Unit reports the gang cycle at a "low ebb" - only two killings last year - Atlanta, once without major gang problems, now counts nine gangs. Similarly, Philadelphia is down to no gang homicides in the last year from 49 in 1974, while incidents of gang violence have been reported in such unlikely cities as Denver, Seattle, Evanston and Minneapolis.

Finally, in notorious Los Angeles County, gangs have more than doubled their membership in the last five years; police in L.A. County now estimate there are some 557 street gangs with 50,000 members. There, "drive-by" shootings have become as common as smog alerts; there, 15-year-old kids smoke angel dust and tote Uzis and AK-47 assault rifles. Such activity, last year, led to the 387 gang-related murders - not a record, but more than the homicide total for all of Europe.

This year looks even worse: Already there have been 86 gang homicides. Chicago - once called Gang City USA - is the base for an estimated 15,000 hard-core members of 135 gangs. In the Windy City, police attribute to gangs 47 of last year's 684 violent deaths.

But those are numbers, sterile, neat and tidy. More meaningful is what you see up close: fascinating, intense and often ugly dynamics. In that sense, the raging kids in Chicago and L.A. bear little resemblance to the confected dash of "West Side Story," or even to the disciplined bureaucracies of the Mafia. Rather, the punks of Los Termites and of the Erroll Flynns suffer from their circumstances. As Walter Miller, a former Harvard Law School professor who for a time was director of the National Youth Gang Survey, insists, "Single, national explanations won't work; you have to look at local, multiple causes, problems of families, reasons for high dropout rates."

The upshot is that to ask why gangs now multiply is to ask what went wrong for the 4 million black Americans still trapped in inner-city ghettos. It is to ask why the Urban Institute reported a quadrupling in the 1970s in the ranks of the extremely poor, and why life for many Hispanics and blacks in America's ghettos has become a self-perpetuating nightmare of fatherless children, drugs and despair.

The point is not rhetorical. Gangs by and large attract life's losers. Worse, they overwhelmingly represent a minority phenomenon: Gangs do not, as Miller notes, "rumble in Weston." Further, while Wisconsin's Moore traces the elaborate evolution in the Los Angeles barrios of quasi-institutional cliques of "bad dudes supplanted by badder dudes and badder," most observers argue a kind of spontaneous combustion from circumstances. The gangs fill holes. They exist because of the deepening failure of the family, of schools, of churches and social agencies, because of the lack of jobs.

That deepening failure grows now, many argue, because of complex economic and social effects analyzed by the sociologist William Julius Wilson in books like "The Declining Significance of Race," which popularized the concept of the underclass. According to that idea, with the upwardly mobile the first to leave, with factories closing and the information-age job market shifting to create excellent service employment elsewhere but few decent jobs for the urban unskilled, those left behind in the ghetto have inherited not "a culture of poverty but of social isolation." The effect is of collapse: a removal of models and hope, a cleavage between what Elijah Anderson, a professor of sociology at the University of Pennsylvania, calls "old heads and young boys."

Concludes Walter Williams: "What's happening in neighborhoods is that people who care about nice streets and safe lives move out and leave the place to worse and worse types, who don't care. By the end of the day, the worst guys - the gangs - control everything."

Beyond economic causation, all this grows darker when put against statistics like that of a recent Census Bureau report that of the nation's 4.6 million black families with children, 2.6 million were headed by a single woman. In that connection, as Moore has shown in extensive studies of Chicano gangs in East Los Angeles, the gangs answer to deep psychological needs. They attract kids from "not very happy families," kids who are rootless and unwanted, whose homes and schools are places of conflict, who cannot picture themselves as a part of traditional American society.

For these kids - who are "jumped in," typically between ages 13 and 15 - the gang becomes an entire world. Not well organized, the gang nevertheless provides the prehistoric pleasures of the clan: a language, hand-signals, colors, whether Reebok red or New York Giants blue. Similarly, spray-painted pictographs delineate turf, the gang's prized possession. In this way, the gang subculture for the excluded both symbolic challenge and an escape from what the Mexican poet and philosopher Octavio Paz has called the "labyrinth of solitude." "To belong is to belong," explains Malcolm Klein, a professor of sociology at USC. Notes Spergel, "The gang provides a structure where there was nothing: It gives status, strength, glamour, maybe even money." Unfortunately, however, that strength leads directly nowhere.

In the end, solutions look difficult. Just as Hollywood images - whether hard-boiled or romantic - miss essential realities, Hollywood-style enforcement as attempted in Los Angeles is alone inadequate. Worse, it cuts to the most fundamental questions of public policy to suggest that eliminating gangs requires addressing matters as widespread as drug abuse, poor school performance, gun control and unemployment. That campaign, as Walter Miller points out, would certainly be expensive; it also would involve coming face to face with the nation's underclass.