Few thought they had a winner. In the months during which the Supreme Court was deliberating a fair housing case involving a Richmond real estate firm (Havens Realty Corp.) and a Richmond civil rights group (Housing Opportunities Made Equal (HOME), hardly any of the national anti-discrimination groups monitoring the case thought the Burger court would side with them.

But it did. In a 9-0 decision last month, the court upheld HOME's right to sue Havens because the latter allegedly practiced racial bias. On three dates in 1978, Sylvia Coleman, a black citizen, asked Havens about the availability of an apartment in the firm's Camelot townhouses. No vacancies, she was told. On the same three dates, R. Kent Willis, a white, approached Havens. There were vacancies, Havens told him.

Coleman and Willis were "testers." In fair-housing circles, testers are used to discover if real estate firms are violating the 1968 Fair Housing Act by illegal racial steering.

Writing for a unanimous court, Justice William Brennan wrote: "A tester who has been the object of a misrepresentation . . . has suffered injury in precisely the form the statute was intended to guard against . . . That the tester may have approached the real estate agent fully expecting that he would receive false information, and without any intention of buying or renting a home, does not negate the simple fact of injury within the meaning of (the law)."

This victory for the nation's blacks, Hispanics and other minorities is worth celebrating for a number of reasons. It sent a rebuking message to the reactionary National Association of Realtors, which had filed an amicus brief in the case and described HOME and its testers in raw language as "self- elected 'civil rights' vigilantes." The defeat of the NAR position is fortunate because the regressive organization has long been an embarrassment to the many real estate firms that take pride in obeying the Fair Housing Act.

More than what has been said to groups like NAR, the court's decision offers a deserved morale boost to those who are fighting against housing discrimination. In the past 20 years, fair housing has been the poor relation in the civil rights family. Voting rights, school desegregation and equal employment attracted reformers who knew how to persuade Congress and the courts. Fair housing was a "sometime" issue: sometime the country would get around to it, sometime the racism in housing would be as glaring as it was in the voting booths, schools and work sites.

Not only is fair housing an issue waiting to be taken in from the cold, but the current climate has its own chill. In 1980, the Senate narrowly defeated several House-approved strengthening amendments to the 1968 law. The Senate, hit by a computerized letter campaign orchestrated by the real estate lobby, was more influenced by the weight of the mail than by the weight of evidence about housing bias.

It may be worse now. The Justice Department under Ronald Reagan has little interest in enforcing the law and no enthusiasm for carrying on the innovative fair housing cases begun by the Carter Justice Department.

Martin Sloane, director of the National Committee Against Discrimination in Housing, sees a period of retrenchment. "We're just trying to hold on to what we have," Sloane says of the legal and programmatic structure that has been built up. In the past year, the four lawyers on his staff have brought --and won--a series of fair housing cases, in contrast to the Reagan Justice Department's record of not litigating a single major case.

HOME's victory in the Supreme Court balances that somewhat. But the case probably would not have reached the Supreme Court had not a large Washington law firm taken it pro bono. Fried, Frank, Harris, Shriver & Kampelman says that the litigation, when figured in staff hours, secretarial work and other expenses, cost $490,117.

That's a generous donation to the public good. But access to justice becomes haphazard if the poor must depend on the kindness of big law firms. The power of the fair housing law was intended to be enough.