The political bosses and bosslets were cracking hard crabs and swilling beer along with Maryland Acting Gov. Blair Lee III when one of his opponents in this fall's gubernatorial election, Theodore G. Venetoulis, strolled into the Baltimore crabhouse.

True to his campaign fashion, Venetoulis was in shirtsleeves, his tie askew. In pointed mockery, Lee and his running mate, Steny Hoyer, jumped from their chairs, doffed their own coats and personally greeted the blushing challenger as he entered.

Such light moments are rare these days as the Democratic primary contest for Maryland's governorship charges into the final six weeks and the four candidates prepare to criss-cross the state in exhausting campaign swings and jam the airwaves with political promises.

"This is the crucial phase when people make up their minds," said Venetoulis' campaign manager, Jackie Smelkinson. "Everything we've done for the last six months is preparation for delivering our message in the last six weeks. People are listening now."

The Democratic candidates have already raised and spent $1.5 million in campaign funds, set up local organizations, blanketed the press with white papers, lined state roads with bill-boards and balanced their tickets with running mates.

But the once-crowded Democratic field has recently been narrowed to two leading candidates - Lee and Baltimore County Executive Venetoulis - men of sharply contrasting personal backgrounds, campaing styles and bases of political support.

Lee, 62, scion of one of Maryland's founding families, who holds a comfortable lead in published polls, has rounded up the support of the state's old line political organizations and the political operatives who worked for suspended Gov. Marvin Mandel.

He is a stately, formal man with well-groomed silver hair who campaigns in a low-key, courtly manner, entertaining groups on the state yacht and shaking hands at official events. he underlines his incumbeny with the campaign slogan: "He's Doing The Job."

Venetoulis emerged as Lee's chief rival two weeks ago after a newspaper poll showed him gaining ground on the acting governor. A few days later, State Attorney Francis (Bill) Burch, a longshot given some chance of winning, pulled out of the race.

The uphill flight of Baltimore County Executive Venetoulis received, an important boost last week when Maryland's largest labor organization endorsed him, promising thousands of volunteers and thousands of dollars in contributions.

The son of a Greek immigrant who grew up in Baltimore, Venetoulis, 44, enjoys a strong following among liberals. He styles himself as a reformer and pledges to build a "New Maryland" free from political scandals that have stained the state's image.

He is an energetic man with tousled salt-and-pepper hair who manages to get before the television cameras so often that he has earned the nickname "T.V. Teddy." A consummate campaigner, he literally runs through neighborhoods, bussing cheks and hugging surprised voters, as the theme song from the film "Rocky" blares from his truck.

The qualities of personality - Lee's staid but steady hand and Venetoulis' electricity - have become the center-pieces of the campaign, dominating the more substantive issues of economic development, taxes and integrity in government.

It is the personality that voters feel "most comfortable with" that will win in the end, say Lee's strategists. "Blair is for a lot of people a father figure, there at home doing the job," according to Lee's campaign coordinator, Fran Tracy.

When the candidates rare back and loose their hottest campaign rhetoric, they deal in personalities. On Saturday, Lee accused his opponent of recklessly "bartering away the state's financial security" by promising labor groups he would support collective bargaining.

Venetoulis, in turn, often describes Lee as a remnant of the administration of Mandel, who was convicted of corruption charges last year. Venetoulis said Lee, who was Mandel's lieutenant governor, lost labor's support because labor wanted to end Lee's "wheeling and dealing."

The key to September's primary lies with the undecided voter today. The hefty segment of voters without a favorite candiate - as high as 40 percent in one poll - heartens Venetoulis and two distant longshots, Harry R. Hughes and Walter S. Orlinsky.

"As an incumbent governor," said Smelkinson, "Blair ought to have those voters already. They're undecided and they know him. They don't know Ted yet. Our campaign is ahead of us. We have the energy and vitality to get our message across."

Converting the unconverted will be the main task of each candidate in coming weeks. Venetoulis and Lee already have planned for intensive telephone polls to identify undecided voters and door-to-door canvassing and television spots to win them over.

The final surge should be costly at a time when candidates agree campaign money has never been tighter. Lee has raised $450,000 and hopes to add another $300,000 at a fundraiser next month. Venetoulis has collected $325,000 and says he needs $175,000 more.

Venetoulis' drive to overtake Lee is expected to be complicated by the campaigns of former Maryland Transportation Secretary Hughes and Baltimore City Council President Orlinksy, both of whom are seen as cutting into Venetoulis' strength among liberal and Baltimore voters.

Venetoulis and his running mate, Anne Arundel County Councilmember Ann C. Stockett, are trying to solidify their home base to offset Lee's organization support in Baltimore. Lee, of Montgomery County, and Hoyer, of Prince George's, are expected to roll up a heavy plurality in the Washington area.

Orlinsky, 40, a politician with a flair for the unconventional, is pursuing a "rural" strategy. He hopes to monopolize votes on the Eastern Shore and the Western Maryland base of his running mate, Frederick Mayor Ronald Young, and add them to his Baltimore forces.

Hughes, 51, who resigned as secretary of transportation a year ago after charging that a major subway contract had been improperly interfered with, is running a reform campaign but does not have a strong geographical base of support.

Hughes and his running mate, Prince George's County Councilman Samuel W. Bogley, are billing themselves as "The Honest Difference."