DENVER — If marijuana is legalized and properly regulated, its proponents have long said, it could generate millions of dollars in state tax revenue. But how the drug should be taxed has proved to be a thorny question.

In Colorado, where voters approved a measure in November legalizing small amounts of marijuana for recreational use, officials have been grappling with this issue for months as the state works to forge a cohesive regulatory code.

This week, legislators here will consider excise and sales taxes on marijuana of up to 30 percent combined. The proposal emerged from a task force of health officials, representatives of the state’s rapidly developing marijuana industry and others that was commissioned last year to help develop rules for marijuana.

The goal, task force members and lawmakers say, is to set taxes high enough to finance the administration of new laws, but not so high that customers are driven back to the black market.