If cake artistry counts as speech, what doesn't qualify—and how do you tell the difference?

That was the essence of the question the Supreme Court asked this morning during oral arguments in Masterpiece Cakeshop v. Colorado Civil Rights Commission. The case centers on whether a state may, in the interest of preventing discrimination, require a private baker to produce a custom wedding cake for a same-sex marriage celebration.

As Jack Phillips, the baker in question, put it yesterday in a USA Today op-ed, his creations are "not just a tower of flour and sugar, but a message tailored to a specific couple and a specific event—a message telling all who see it that this event is a wedding and that it is an occasion for celebration." Such a message in the case of a gay union, he wrote, "contradicts my deepest religious convictions." His lawyers argue that nonetheless forcing him to "sketch, sculpt, and hand paint" a cake, as the state civil rights commission has done, is "compelled speech" and a violation of his First Amendment rights.

But wouldn't the same logic, the justices wanted to know, permit someone to turn potential clients away based on their race or religion as well? Could someone refuse to make a birthday cake for an African-American child by saying his religion tells him it's wrong to "celebrate black lives"?

This is an important legal question, because unlike sexual orientation, race and religion are protected classes at the federal level—and laws against discrimination on those grounds have been frequently upheld. (In 1983, for example, the Court ruled that Bob Jones University could not claim a religious exemption to government desegregation efforts.) If Phillips' challenge to the Colorado rule necessarily implicates widely accepted decades-old protections against other forms of discrimination, it stands little chance of succeeding. Like it or not, the Court is not about to throw out a key provision of the Civil Rights Act.

On the other hand, if there is some aspect of the Colorado policy that clearly separates it from (and makes it more egregious than) the laws that came before, the justices might be willing to side with the cake artist. Thus, their frequent attempts to get Phillips' lawyers to narrowly define a theory about when the state can or can't butt in. "What is the line?" Justice Stephen Breyer asked at one point. "The reason we're asking these questions is because obviously we want some kind of distinction that will not undermine every civil rights law."

It wasn't just the baker's legal team that was pressed to state a limiting principle. When the attorneys representing Colorado took the floor, they were immediately interrupted with similar queries. Is there any form of compelled expression, the justices wanted to know, that would in the state's view cross the line? If the government can require you to make a cake against your will, what can't it do—and how do you tell the difference?

Could a state force Catholic Legal Services to represent a same-sex couple in a wedding-related dispute, Chief Justice John Roberts asked, since the nonprofit happily represents heterosexual couples in similar situations? What about a case that involves words and not just images, Justice Ruth Bader Ginsburg suggested—would Colorado say a baker must spell out "God Bless the Union of Charlie and David" in frosting? Justice Samuel Alito wondered if a writer who gets paid to pen wedding vows for couples could be made to do so for a gay marriage.

If any of these regulations fail, the justices were implicitly asking, what makes the Colorado law different? And if all these regulations are licit, well, what good is the Constitution?

The Supreme Court is left with something its members clearly see as a difficult task: defining the contours of a state's power to require people to do what their religion tells them they may not. But the justices might have found a sort of get-out-of-jail-free card allowing them not to make such a tricky ruling: In stark language, several questioned whether anti-religious animus may have motivated the Colorado Civil Rights Commission's judgment against Phillips.

Justice Anthony Kennedy pointed out that a couple of the commissioners were on the record making impolitic statements about people who hold traditional religious values. (Justice Neil Gorsuch paraphrased one of those comments as, "If someone has an issue with the laws impacting his personal belief system, he has to look at compromising that belief system.") Kennedy then all but demanded the state solicitor general disavow the comments publicly. Roberts noted that, in the context of a court ruling, "one biased judge might have influenced the views of the others," implying the same could be true here. Alito said the judgment looked to him like "discriminatory treatment based on viewpoint," because the commission had opted not to bring cases against bakers who refused to create cakes adorned with pro–traditional marriage messages. "Counselor, tolerance is essential in a free society," Kennedy concluded. "It seems to me the state in its position has been neither tolerant nor respectful of Mr. Phillips' religious beliefs."

If a majority of the justices think the evidence for that accusation is strong, it's possible they'll overturn this specific ruling without taking the additional step of throwing out the underlying state anti-discrimination law it was based on. Which would be good news for Jack Phillips—and for lawyers everywhere, since it would open the door for future challenges, and many more would certainly be forthcoming.