The moods ranged from joy to pesimism as 500 people gathered at the White House yesterday to commemorate the 25th anniversary of the Brown school desegregation decision. While most observers, from HEW Secretary Joseph Califano to civil rights leader Jesse Jackson, were cautious and pensive, there was one light movement.

Mary Berry, an assistant secretary of HEW, in rushing through her remarks spoke of the need for strong presidential leadership, and said of Jimmy Carter, "he will continue to discriminate," instead of "demonstrate." The East Room, filled with a couple of generations of equal-rights stalwarts, rocked with laughter.

When he arrived for the afternoon reception, President Carter light-heartedly acknowledged the slip, and then rekindled a somber mood by requesting a moment of silence for A. Philip Randolp. "He had personal dignity, eloquence and unshakable commitment to human rights," said Carter of the labor and civil rights leader who died Wednesday night.

During this remarks, a serious analysis of the effects of the Brown decision and the unfinished struggle for racial equality, Carter announced the nomination of Nathaniel Jones, general counsel of the NAACP, for a federal judgeship. There were audible gasps and long applause, underscoring the timeliness of the appointment of a veteran civil-rights attorney on such an occasions.

"I was stunned," said Jones, whose nomination has been rumored for months. "I really didn't know. I had heard the discussion, then I heard the contrary." But Jones had more than an inkling because, according to his friend Clarence Mitchell, Jones had asked him to stay by him in case Jones fainted.

Yesterday's reception was the largest for a group of black leaders since 1963 when John Kennedy invited 1,000 people for a celebration of the Emancipation Proclamation.

Among yesterday's guests were U.N. Ambassador Andrew Young, Undersecretary of State Barbara Watson, Civil-rights leader M. Carl Holman and Dorothy Height, historian John Hope Franklin, educator Benjamin Mays, federal appointees James Joseph, Drew Days, John Lewis and Ersa Poston. Many of the lawyers and appointees involved with the school desegregation cases attended, as well as Judges Constance Baker Motley, Frank Johnston, Damon Keith and Paul Webber.

Kenneth Clark, the psychologist whose studies of black children's attitudes were a crucial part of the cases, was livid about a quote in a newspaper yesterday from a black New York City school administrator that predominately minority schools were acceptable.

Clark, who had denounced the report at a meeting at Howard University yesterday morning, said again, "He is the norther version of standing in the schoolhouse door. And it would bother me on any day. That's a flagrant, cold statement. He was really saying that these children are expendable."

In one corner of the reception room, Dorothy Height, president of the National Council of Negro Women, was absorbing some of the pessimism. "What it means is that we have to redouble our efforts. What's good about this moment is that we have recaptured a solidarity. I feel a purpose I haven't felt from this group in a while."

A few hours later, the group of Brown anniversary celebrants had expanded to 1,000 guests at a sit-down dinner at the Shoreham-Americana Hotel. Yet the massive gathering never really became a celebration.

"For me it's a pessimistic moment, it's still more the possibility of equality that the reality," said former attorney general Ramsey Clark. Washington Mayor Marion Barry picked up this thread as he told the dinner audience, "This is no time to be happy about 25 years of struggle when tonight in Washington, New York and Mississippi a black child that's born will live five years less than a white child born tonight."

The progress since Brown, said Wiley Branton, comes down to a matter of perception. "I do have a favorite story about perception. On the first day a young man elisted in the Army, they gave him a comb. That afternoon, they cut off all his hair. The second morning, they gave him a toothbrush, and then sent him to the dentist, where they pulled out all his teeth. on the third morning, they gave him a jockstrap, and he went AWOL. The facts have not changed since Brown, but the perceptions have."

Now, said Branton, the social injustices "are perceived as wrongs," but the social injustices still exist. CAPTION: Picture, President Carter and U.N. Ambassador Andrew Young, by Ken Feil.