For President Reagan in Washington this past week the outcome of the voting in El Salvador was gray, not a clear black or white.
He had hoped to keep the ''good guys'' of the Salvadoran moderate center in the government. But they won only a plurality, not a majority. And the rightist parties, which when combined had a majority, want to cement their own full control over the government.
Can the US cooperate with and support a right-wing coalition?
All across the foreign policy spectrum, the American President is facing similar gray situations. The clear solutions to foreign policy problems that seemed so obvious and so easy on the campaign hustings of 1980 are all glimmering ever further out of reach like will-o'-the-wisps.
It's the same in the Middle East as in Central America. The ''strategic consensus'' between Israel and the Arabs has been torpedoed by Israeli Prime Minister Menachem Begin's creeping annexation of the West Bank and Gaza.
There is no way Mr. Reagan can get Camp David and its ''full autonomy'' for the West Bank Arabs back on track without offending the American pro-Israel community. At home, the support of that community for the Republicans is increasingly important as economic troubles whittle away at the President's general political support and as the midterm elections approach.
It's the same in East-West relations. The President wanted the West European allies to support him in a campaign of heavy economic sanctions against the Soviet control over Poland. But without an American grain embargo the Europeans declined to play that game.
Policy toward the Far East suffers from the same condition of ineffectiveness. Back on the hustings it seemed possible to revive American ties with Taiwan, rather than de-il16l,0,10l,4p6velop the association with communist China which discomfits many Republicans.
But every time Mr. Reagan proposes to send guns to Taiwan, the mainland Chinese manage to remind Washington that they have the option of resuming relations with Moscow. Moscow is quick to sense an opportunity. The Soviets have just made another move to regain Chinese good will.
And then there's Japan. US Secretary of Defense Caspar Weinberger has again been trying to talk the Japanese into increasing their defense budget. It would be helpful if they would. It would reduce the military burden on the US. It might permit some cuts in the US defense budget, or some increased US presence in the Indian Ocean. But Washington is also pushing the Japanese to cut their exports to the US market. It's difficult to persuade them to spend more of their money on defense and at the same time ask them to earn less from their exports.
Alliance relations are difficult, too. The European Community countries held their 25th anniversary meeting in Brussels this past week. They are at one with Washington about Japanese exports. They, too, want Japan to cut down the volume of its sales into their market. But they also suffer from rising unemployment and general economic stagnation -- which they tend to blame most on high US interest rates, sucking their investment capital into the New York money markets.
Wherever President Reagan looks beyond American frontiers, he sees problems that are not yielding to quick or easy solutions, problems that may well be with him as long as he is in the White House -- even if that means through 1988.
The voting in El Salvador provides a clear example of how difficult it is to get ''solutions'' in world affairs.
The voters of El Salvador turned out in unexpectedly large numbers in spite of threats from the left-wing rebels. They gave more votes to the moderate center party of President Jose Napoleon Duarte than to any one other party. But it was not a majority.
Had El Salvador's people gone hard left, abstaining en masse (as the guerrillas hoped) from voting, Mr. Reagan's course might have been clearer. He would have known that the time had come to get out. No more money to be spent inside El Salvador in support of regimes that had totally lost the support of the populace. Or if the Salvadoran voters en bloc had gone hard right, Mr. Reagan could with equal ease have washed his hands of the country and saved some money and guns. But now the problem in El Salvador is how to develop a viable government, with the left still in the back woods sniping from outside, the extreme right trying to cement control of the government through a coalition of right-wing parties, and the comparatively moderate center probably being excluded even though it ''won'' the election.
To further round out the list of current world problems and their difficulties, it should be mentioned that the violently anti-American government of Ayatollah Khomeini in Iran is proving to be remarkably tenacious and successful.
The Islamic regime seems to be gaining ground with its domestic public opinion in spite of severe economic difficulties. And the latest reports from the battlefront seem to show a decided turn in the fighting against Iraq and in favor of Iran. The Iraqis have apparently been driven out of most of the territory they overran in their original offensive and to be in serious need of peace.
The one consolation for Washington in this success story for its unfriends in Iran is that the Islamic regime of the Ayatollah so far has shunned entangling new ties to Moscow. It sounds slightly less anti-Soviet than anti-American in its propaganda. But Islamic Iran has not turned to Moscow in any way that could be considered decisive.
Over all, the Reagan administration is having to learn by experience that solving foreign policy problems can be a long, slow, and frustrating experience. ''Simple'' solutions ignore local complexities. The prospect is that such problems as the unrest in Central America will be with us for a long time.