The text of the First Amendment to the Constitution reads: “Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances.”
Note the Constitution limits Congress, it places no limitations on state and local governments to regulate religion, speech, the press, and the right of assembly.
The Tenth Amendment states: “The powers not delegated to the United States by the Constitution, nor prohibited by it to the States, are reserved to the States respectively, or to the people.”
Note here, the Tenth Amendment gives the States powers not prohibited by the US Constitution or delegated to the federal government. Business transactions inside a state are not regulated by the federal government (per the text of the Constitution). Therefore they can be regulated by the state. For example, state and local governments can require licenses to do business and set standards for professions. The state can regulate activities of a business (i.e. health, hours of operation, minimum wage of employees, collection of sales taxes, treatment of employees, the terms of contracts, number of parking spaces, public restrooms for both sexes, etc.). It therefore stands to reason the US Constitution allows a state to require a store engaged in commerce within the borders of the state to transact business with any person or organization desiring to make a purchase.
Unfortunately, the US Constitution did not establish a free market nor did it prohibit or limit regulation of commerce by a state within its borders. It appears in this case, the state of Colorado has exercised its prerogative to require businesses in the state to serve all customers. The immediate choices for the business owner are to serve all customers or close the business. Longer term the owner can petition the legislature to overturn the law.
The Colorado law may or may not be bad law. It certainly limits the freedom of business owners to choose their customers. However, it is Constitutional if one believes in the Constitution as written.
I have heard the US Constitution trumps state laws...see gun control.