This mountain city is trying to preserve its middle-income housing with a new ordinance that set limits on the resale price of moderate-income units.

Passed by the City Council recently -- and the first of its kind of Colorado -- the ordinance does not say what constitutes moderate-income housing. But the Boulder Housing Authority defines moderate-cost housing as single-family homes or town houses costing about $52,000. In fact, few homes in Boulder sell for that little.

The ordinance applies only to houses built in the future -- in areas controlled by a growth plan that was enacted in 1977. The houses must be designated moderate-income units at the time of construction.

Until recently, a moderately priced home could -- and some say often was -- resold soon after its first purchase for an easy profit of several thousand dollars, disappearing from the city's stock of moderate-income housing in the bargain.

Currently, a moderate-income home would cost about $54,000 for a family of four with between $15,000 and $23,000 annual income and a 10 percent down payment. The city uses a federal formula to calculate income levels.

Scott Cowan, president of the Boulder Board of Realtors, puts the average cost of a home sold in Boulder since Jan. 1 at $90,000. His own most recent sale was a four-bedroom, 2,400-square-foot home that went for $112,000.

The new ordinance mandates that homes built as moderate-income units stays that way. For 15 years, an owner cannot raise the home's price by more than the increase in the Denver area's median income -- about half the area's inflation rate last year.

If an owner cannot sell the home within six months, the Boulder City Housing Authority has a right of first refusal. Each time the home changes hands, the 15-year time clock begins again.

Cowan was one of several Realtors making last-minute objections before the measure was enacted May 27. One man called it price fixing, while Cowan settled for "too restrictive."

Cowan said this week that he no longer believes the ordinance is "that big a deal," but still wonders if it will work. Particularly troublesome is the housing authority's right of first refusal. The Federal Home Loan Mortgage Corp. buys between 15 and 30 percent of all mortgages from Boulder area savings and loans, he noted, and Freddy Mac insists on its own right of first refusal.

"I've talked with people in the city and at the housing authority and they've assured me they don't want to create a hardship for anyone with the ordinance," Cowan said. "They just want to stop the fast operators from taking a moderate-income house out of the market.

Home building here operates under a merit system of permit allocation, with points given to builders for proximity to schools and other existing services, energy conservation and price. Twenty percent of the merit system's points are given for price, and 77 "moderate" units have been built since 1977 under that provision.

In some cases, builders have included such units at less-than-normal profit in order to get permission for an entire subdivision. Houses that might have been sold for $60,000, for example, were sold for several thousand dollars less -- at little more than cost -- while the builder added the lost profit margin to other houses nearby.

The system Boulderites have developed for shaping their environmental and urban future began in 1967, when residents imposed a 0.4 percent sale tax to buy up developed land for future generations.

Since then, Boulder has retained its mountain vistas with a 55-foot height limitation by prohibiting city water lines from reaching too far into nearby mountainsides. It has discouraged further industrial development of any sort, opting to leave IBM and Beech Aircraft as the city's major civilian employers.

In 1977, it began limiting its annual growth rate to between 1 1/2 and 2 percent by restricting the number of building permits issued each year.

A string of ordinances, resolutions and voter mandates form what City Councilman Paul Danish -- for whom the city growth plan, the "Danish Plan" is named -- calls "Boulder environmental constitution."

Realtor Cowan said in a recent interview that he knows of no court test being planned for the new price-control ordinance. The growth control and merit-allocation systems are to remain in effect until 1982, he noted, and said he expects any programs within the framework of the new ordinance to be addressed by a citizens' committee now deciding what, if any, changes to make when the original Danish Plan expires.

Danish recalls being stopped on the street just after the growth-control plan was adopted and having people "swear up and down they were going to take us to court." No one ever did, he said.

City Attorney Joseph deRaismes said he expects no legal action from the latest ordinance, either.

"It's a relatively minor provision," deRaismes said. "All it says is that if the city helps you get things built, by giving points for a moderate-price unit, then those units should stay moderately priced for a while. The builder's getting a benefit and the city should, too."

Danish based his growth-control measure on one from Petaluma, Calif. Part of the reason for choosing Petaluma's pattern as a model, he said, was that it has just passed a U.S. Supreme Court test.

Just how many homes eventually will be protected under the new ordinance is at best a guess. "Like just about anywhere else," as assistant city planner Ed Gawf says, Boulder residential construction has dipped sharply in recent months because of high interest rates and uncertainty about the economy.

Only 100 residential buildings permits have been issued since Jan. 1, he said, and some of those have yet to be used.