“The permits!” The voice was panicked. “They’re fucking us!”

“Slow down. What’s wrong?”

“They’re revoking our permits.”

This was the call I got eight years ago on the eve of a graffiti block party I was throwing to celebrate the release of my first video game, “Getting Up.” It just happened that this call set in motion a series of events that very few have experienced. I, Marc Eckō, went up against Mayor Michael Bloomberg in New York City and won.

It taught me an important marketing lesson that most overlook: Find the foil.

What is a foil? It can be anything or anyone that serves, by contrast, to call attention to your own merits, like Batman and the Joker. When you have a good foil, you connect with your consumer on a more emotional level.

In our case, we had planned an outdoor event on Manhattan’s 18th Street and 10th Avenue, where graffiti legends would paint on full-scale replicas of R10 subway cars facades like they used to in the early 1980s. No public property would be defaced. No vandalism would occur. Just commissioned art.

We got the permits far in advance. The city approved it. Out of nowhere, this Queens city councilman, Peter Vallone Jr. (“The Man Who Hates Graffiti”), caught wind of the event, and he thought that the event would surely trigger a rash of graffiti around the city. He warned the press, “This is going to be an exposition of how to pickpocket.”

Still, we had the permits, right? What could he do to stop it?

At least one person was convinced by Mr. Vallone: Mayor Bloomberg. (I hope Mike just owed him a favor or something.) Regardless, the mayor went on the radio to say, “Graffiti is just one of those things that destroys our quality of life, and why anybody thinks that it’s funny or cute to encourage kids to go do that, I don’t know. We have talked to them and asked them to not have a subway car motif to write graffiti. This is not really art or expression; this is—let’s be honest about what it is—it’s trying to encourage people to do something that’s not in anybody’s interest.”

So they revoked the permits.

We called our lawyers, and they said, “You know, we might have a First Amendment case.”

This was Bloomberg pre-third term. Not that I begrudge Mr. Bloomberg or object to his politics even. But I figured, who the fuck is this guy? And what favors did a clown like Vallone do for him that suddenly he even needs to get involved? Seemed a little trivial to me. No?

When you dig deeper into Mr. Bloomberg’s rationale, he said that theoretically we could paint in public “on a canvas,” but if we painted on these replica subways—my replica subways (by the way, that weren’t cheap)—it would be forbidden. WTF? How does this make sense? How is a canvas different from a fake subway? We knew we had a case, so we hired Ron Kuby, the civil rights lawyer famous for defending flag burners, alleged murderers, suspected terrorists and, now, graffiti artists.

We called a press conference. It was one of my first times addressing the media in any material way, and I felt confident. As the cameras flashed, video rolled and reporters shoved microphones in my face, it felt good. It was an echo of my high school performance as B-boy Toto in the musical The Wiz. Up until now, I had been tucked behind the curtain, a behind-the-scenes guy. Now, I stepped out in front.

After that press conference, we took it to the courts: Ecko Unltd vs. Mayor Bloomberg and the City of New York. I liked the sound of that.

And the verdict?

The court backed my First Amendment rights and even showed a sense of humor. Straight from the pen of U.S. District Judge Jed S. Rakoff (who later became a hero to the 99 percent when he rejected sweetheart settlement deals the SEC had approved for Bank of America and Citigroup: “By the same token, presumably, a street performance of Hamlet would be tantamount to encouraging revenge murder. Or, in a different vein, a street performance of rap music might well include the singing of lyrics that could be viewed as encouraging sexual assault. As for a street performance of Oedipus Rex, don’t even think about it.”

So we do the block party, and guess what happens? Thanks to this controversy, MTV covered it, along with far more media outlets than would have otherwise taken notice. We had three Boy Scout troops, a public school, a host of notable old-school fixtures of the NYC rap community and many others. The effect of the scope of our emotional impact? We quadrupled our planned attendance.

Thanks, Mike! Or shall I say, thanks, Peter—for dragging Mike into this comedy.

It also taught me something important: Find the foil.

When you have a good foil, you connect with people on an emotional level. The foil helps call attention to your own merits, just as Joker brought out the best in Batman. For me, it was this Vallone/Bloomberg sandwich. In the moment they dismissed graffiti, both as art and as something that “ruins our quality of life” and unilaterally obstructed our First Amendment rights, they became our perfect foil.

I went head to head with Mssrs. Bloomberg and Vallone, because I knew that even if I lost I would have won. (And frankly, when you go against Mike, you’re more likely to lose than win. That’s just a fact.) But in this case, the law was on our side, and we won.

I like Mayor Bloomberg, especially what he has done in education. I have a tremendous amount of respect for the man, and as an entrepreneur he is legendary. He has been a great mayor. He just happened to be completely and totally wrong in this instance.

As I talk about in my book, with “nemesis marketing” or “foil marketing,” you and your consumers suddenly become compatriots—co-conspirators in righting a wrong. It gives everyone something to root for and root against. I didn’t love the fact that Mr. Bloomberg had to be our foil, but he took a side and a stand that was diametrically opposed to my life’s work. That made him the perfect nemesis.

In your own business, what if you don’t have a good foil? Invent one. Consider what is arguably the most famous ad of all time. In Apple’s “1984” spot, a fictional Orwellian dictator symbolizes IBM, suggesting that if you hate evil dictators or the status quo, you should buy a Mac.

We had the right foil. We were challenging something everyone wanted to challenge: the forces in our lives that tell us what we can and cannot do. That was our nemesis.

Marc Eckō is an American fashion designer, entrepreneur, investor and artist. He is the founder of Marc Eckō Enterprises, a global fashion and lifestyle company and Complex Media. His book, Unlabel: Selling You Without Selling Out, was released in October.