No, it was based on WHAT the cake was for, what the celebration was.
Who else woudl be celebrating that?
Phillips tried to claim his refusal was about what the cake was for in his every court appearance including with the Supreme Court. No judge accepted this claim because there is no way to separate what the cake is for from who it is for. This was summed up in the ruling of the Colorado Court of Appeals:
"conduct cannot be divorced from status. This is so
when the conduct is so closely correlated with the status that it is
engaged in exclusively or predominantly by persons who have that
particular status. We conclude that the act of same-sex marriage
constitutes such conduct because it is “engaged in exclusively or
predominantly” by gays, lesbians, and bisexuals. Masterpiece’s
distinction, therefore, is one without a difference. But for their
sexual orientation, Craig and Mullins would not have sought to
enter into a same-sex marriage, and but for their intent to do so,
Masterpiece would not have denied them its services. "
Craig and Mullins v. Masterpiece Cakeshop. Opinion by JUDGE TAUBMAN