Just when it seems impossible to get any more outraged about the idiocies of network television, a lunacy comes along to reawaken indignation. Executives at ABC have canceled the comedy series "Taxi," one of the few programs on its schedule with a heart and a mind. The series will not be back in the fall, and James L. Brooks, who created and helped produce it, is both crestfallen and furious.

"I am trying to cut a happy distance between rage and depression," he says from his office at Paramount. Ironically, Brooks, while at MTM Enterprises, was also present at the creation of "Lou Grant," another superior series canceled by another network, CBS. "Grant" was a victim of low ratings and the distracting extramural political hijinks of its star, Ed Asner.

But the ratings for "Taxi" weren't bad; Brooks says the program averaged a 26 percent share this year, and a 26 share is considered break-even in the industry (30 is a hit, 20 a flop). In addition, Brooks says, "Taxi" won the Emmy for best comedy series every year it has been on (it just finished its fourth season).

"It's awful. It's awful," he says. "It takes the heart out of some very good people. The one thing that's clear from this is that the network is saying to everybody, 'Don't think Emmys will do you any good when it comes to scheduling.' "

Brooks was notified on May 4 of the cancellation, after what he describes as horrible meetings with such network executives as Anthony D. Thomopoulos, president of ABC Entertainment.

"There was one key meeting when I felt I was in one of the bad Rod Serling episodes," says Brooks. "Most of them were good, but once in a while they'd do one about somebody talking but nobody quite hears them. That's how I felt. Thomopoulos kept saying he was strong enough to 'take the heat' about canceling 'Taxi.' He began to equate that with executive ability in a very perverse way.

"I brought up 'quality' at one point, and one executive made the kind of gesture that says, 'How do you talk to somebody who uses words like that?' " The history of network television has shown without a peep of a doubt that the word "quality" carries less weight at ABC than it does at NBC or CBS.

Brooks is asked if he isn't worried about endangering his own television career by speaking out against such executives. He says, "I hope they endanger their own television careers with this decision. We always hear about their callousness, but this is an incompetent decision, I think, not just a callous one.

"There is nothing that ABC is doing in television that leads me to think we could have a common goal. I can't imagine myself working for this group of men again. I can't do that. Besides, what would I do? I can't do much better than 'Taxi' and they canceled it."

With the concurrent demise of "Barney Miller" on ABC, the network is left without a single surviving comedy program of any measureable intelligence; "Mork and Mindy," which was at least cute, has also been canceled. But "9 to 5," a miserably unfunny--but trendily pseudo-feminist--comedy series, has been renewed and will be moved in the fall to a virtually failure-proof time slot, after "Three's Company" on Tuesday nights.

"It's gotta get a rating in that slot," says Brooks, "and as opposed as I am to saying bad things about other shows, what you have there is an hour of women who have big breasts. It's that kind of continuity of programming that governs ABC."

We may be entering a new Cold War of network television. Faced with competition from competing technologies, especially pay and cable TV, network executives seem stymied and desperate, and reckless brinkmanship escalates. It could also be that they just don't know what they're doing.

"If we're lucky they don't know what they're doing," says Brooks. "If this is part of some grand plan, then we're really in trouble."

"Taxi" was a smart, warm, lovingly rowdy show about a group of dreamers and survivors holed up in the purgatory of a New York cab company; there they awaited and imagined Bigger Things to Come. Some people think the show was inspired by the grisly movie "Taxi Driver," but it wasn't. It is based on a two-part magazine article that originally appeared in New York magazine and caught the attention of Grant Tinker, then president of MTM and now president of NBC.

Brooks and distinguished colleagues later left MTM--where their triumphs had included "The Mary Tyler Moore Show"--for Paramount and, Tinker said in an interview, "by the time they went to Paramount our option [on the article] was over and they just used the damn thing and Jim has never paid me a nickel!" He was laughing when he said it. Brooks said Tinker once told him he didn't mind that MTM didn't get to do the show "as long as he got to watch it on television."

Brooks also says of Tinker, "Grant has the potential to be a broadcaster. That's what you call a programmer who looks past his toes."

What particularly saddens him, Brooks says, is that the cancellation of "Taxi" was announced after the season's last episode had already been filmed: "We have a need to be able to end. They denied us a last show. They took the final bow away from the actors." The reruns start tonight. Brooks says "Taxi" might continue in "three or four shows a year" for cable TV. There is the possibility that the show's spectacularly likable cast will be reunited this Saturday night on NBC, when "Taxi" regular Danny De Vito hosts "Saturday Night Live." One can hope they will tell ABC what ABC already knows; that it has no class and, apparently, no sense of decency, either.

"We had the best group of actors and writers in television right now assembled in one tight group," Brooks says. "Nobody would have been mad at ABC for renewing 'Taxi.' ABC would not lose any rating points renewing 'Taxi.' The network wouldn't lose any money renewing 'Taxi.' There's never been in broadcasting history that I know of a show that's won the Emmy each year it's been on that was canceled.

"We heard the talk about possible cancellation, but we thought it was undo-able. We just thought it was undo-able." And yet, it was done. At ABC, they're working overtime to try to make television Even Worse.