Aided by some hitherto radical Africans, the United States and four other major Western powers worked late into the night at a U.N. meeting here today in a last-minute effort to soften resolutions calling for sanctions against white-ruled South Africa and Rhodesia.

The desire for a "cosmetic atmosphere," in one delegate's words, reflected a new mood of African realism at the week-long U.N.-sponsored Conference in Support of the Peoples of Zimbabwe (Rhodesia) and Namibia (Southwest Africa).

The diplomats were trying to find harmless enough language to avoid compromising two sets of negotiations. They are promising talks about the future independence of Namibia going on between South Africa an one side and the United States, Britian, France, West Germany and Canada on the other and the new U.S. - backed British initiative to bring majority rule to Rhodesia by 1978.

Although much watered-down from the original working papers, which called for a total economic boycott of South Africa, two sticking points remained in the general declaration and the "program of action for the liberation of Zimbabwe and Namibia."

They involved a mandatory arms embargo against South Africa and cutting off all postal telecommunications and travel links between Rhodesai and the outside world.

The United States had not sold arms to South Africa for many years, but it does not believe that such an embargo would provided effective leverage. The cutting of communications links is believed to be illegal under U.S. law.

Symptomatic of the new mood here was Marxist Mozambique's active role in seeking compromise alongside the Western powers and the Ivory Coast, which has traditionally maintained an odd man out insistence on dialogue with rather than boycott of South African.

Opposed to the moderate mood were the Soviets and the African liberation movements who wanted concrete steps included in the resolutions.

Conference sources predicted that even if the compromise failed the five Western powers might chose to make their dissent known in as discreet a way as possible without compromising future negotiations with the white-dominated southern African governments.

Among the suggestions was one favoring a declaration to the press - outside the framework of the conference - that would accentuate the positive by noting the mood, momentum and common goals shared by all participants.

Andrew Young, the American to the United Nation, mindful of his visit Saturday to Johannesburg and Vice President Walter Mondale's two-day meeting in Vienna with South African Prime Minister John Vorster, defended his failure to include concrete measures in his speech yesterday which disappointed many black africans.

[Young also received criticism from another aside. News services reported from Salisbury thatt Roger Hawkins, Rhodesia's minister for combined operations, called the American diplomat "a black power fanatic" whose "uncontrolled hate of white skin permeates every statement he makes regarding southern Africa."]

He said he thought the Carter administration "is being received with a healthy mixture of hope and apppreciation on the one hand and skepticism on the other. Everyone wants to really beleive what I say is true, but they have had such a bad experience in the past" with the United States.

"We forget we are responsible for our own past," he added. That past in Mozambique, he said, meant that during the Mozambicans' fight for independence "We gave the Portuguese guns and we gave them bandages."

"We are still dealing with the fact that for 10 years we did wrong things when we did anything at all." he said.

President Carter's recent warnings to South Africa over Namibia and the five-power approach on the same issue have aroused "very positive" responses here, Young said. But it's almost as if people are afraid to believe because they have been betrayed too much."

Once again Young defended his preference for negotiations rather than armed struggle, especially since the guerrilla fighting has accomplished relatively little against either Rhodesia or South Africa in Namibia.

"It just compli cates things to talk about sanctions, embargoes and punishment," he said, arguing that pressure on a selective basis can better bring about change.

Asked why he had spent so much time here with radicals, including a member of the Cuban Central Committee. Young replied: "Because our foreign policy has to deal with problems. It's important for me to understand potential problems and tension points."