THE HAIRSPLITTING at the White House over barbering and styling ended abruptly yesterday when hair-stylists Yves and Nancy Graux were ordered to pack up their blow-dryers and leave immediately. Plans for a new $9,000 unisex salon in the Executive Office Building were also scrapped.

"In a way I'm glad it's over, because the last 18 months have been just a series of insults and aggravations," said Yves Graux at lunch yesterday, an hour after they were evicted. "They treated us terribly."

"I'm completely happy," said longtime White House barber Milton Pitts when told of the eviction of his rivals. "That suits me just fine. I didn't know anything about it. I guess they'll tell me when I get there tomorrow."

The 18-month stylist-versus-barber battle reached the highest levels of the executive branch last week when the White House announced plans to build the new beauty salon at taxpayers' expense to end what Chief of Staff James A. Baker III called a "raging dispute" between Pitts and the Grauxes.

The three had been using the tiny shop in the basement of the White House on different days. It was not a friendly sharing. The Grauxes say Pitts wanted them out. Pitts says his customers were being inconvenienced by their presence. Under the now-canceled proposal, Pitts would have had that space to himself, while the Grauxes would have been moved to the Executive Office Building.

"The barbershop is the president's barbershop and should remain the president's," Baker told the National Press Club last week.

Yesterday, Baker issued a memo which read:

"Henceforth, the barber shop located on the ground floor of the West Wing will be for the use of the president and vice president only.

"Use of this shop or an alternate facility for staff members is under review. However, there will be no alternate facility available within the White House complex in the near term. You should therefore plan to make alternate arrangements privately as you see fit."

Besides leaving the Grauxes visibly upset, the decision also left top White House assistants Helene Von Damm and Ed Rollins without haircuts. Both had afternoon appointments scheduled for yesterday.

In the long run, the Grauxes' eviction could also affect budget director David Stockman, White House spokesman Larry Speakes, Cabinet secretary Craig Fuller, presidential assistant David Fischer and Barbara Bush. They all had their hair styled by the Grauxes at the White House.

Pitts, an old-line Washington barber who also has a shop in the Sheraton-Carlton, serves primarily men. The White House shop had been built in 1970 so he could cut President Nixon's hair, although he was eventually dismissed by the Carter White House. Around the same time, the Grauxes, of the unisex school of hair styling, joined the White House beauty circuit to service both men and women. Pitts was brought back to cut Reagan's hair after he became president.

Yesterday it was unclear whether Pitts will be allowed cut the hair of anyone other than the president and vice president in his White House shop. This could pose a problem for some of Pitts' other customers, such as Attorney General William French Smith and Treasury Secretary Donald Regan, who depend on the convenience of the White House for their coiffures.

Nancy Graux said yesterday that she and her husband were called into presidential assistant John Rogers' office at about 10:30 a.m. and told by him that their services were no longer needed.

"It wasn't right, the way it was done," said Nancy Graux. She and her husband, who own Hair of Capitol Hill and have another shop in the Capitol, seemed shaken by the sudden decision. "I feel so upset," she said.

Nancy Graux said she asked Rogers if the firing had come from the president and that he had answered no.

Rogers, 26, is in charge of all White House perks from parking to use of the tennis courts. He gets his hair cut by Pitts.

"We were examining the problem that existed and with the stormy relationship between the Grauxes and Pitts we thought it a better decision to return the shop to the way it was and for the purpose it was built," Rogers said.

Pitts says he cuts the hair of most of the Cabinet and senior White House staff, and he seems to encourage the expansion of his empire. At a recent reception he offered FBI Director William Webster his card, offering his services, according to Webster's wife, Dru. But Webster would have none of it, she said. The director has his hair cut for $6 by a retired Naval steward, who also cooks at the FBI in the morning.

Pitts says he is a hair stylist. But the Grauxes and the White House refer to him as a barber. "I'm a stylist," Pitts said. "I am not a barber. I style everyone's hair."

This would probably come as a surprise to Attorney General Smith, who goes to Pitts' shop. "All I ever had is my hair cut by a barber," Smith said. "I don't have my hair styled. I don't even know what the difference is between a barber and a hair stylist."

Nancy Graux says there is a big difference. Particularly for politicians. "We have a lot of clients who used to go to barbers, but decided they needed a more constant look," she said. "We aim to develop a consistent appearance so a politician never looks like he needs a haircut or forgot to get one . . . with all their contact with the mass media, they need to place more importance on the way they look."

The Grauxes said they changed Walter Mondale's and Sen. Lowell Weicker's (R-Conn.) look in the past five years. They also style Sens. Gary Hart (D-Colo.), Mark Hatfield (R-Ore.), Ted Stevens (R-Alaska) and John Danforth (R-Mo.) at their salon in the Capitol. They recently added Associate Justice Sandra Day O'Connor as a client.