That’s how you do it.

A homeowner in the US has lit up their house in rainbow colours following a ban on all opinion flags, the Independent has reported.

Last month, it is alleged that the local homeowners association banned the flying of all flags except the flag of the United States.

The decision was made because some neighbours were disgruntled at people flying Black Lives Matter and opinion flags, said the homeowner on Reddit.

Despite the ban, the homeowner had continued to fly the flag which led to him being reported.

The homeowner claims to have been flying the flag on their porch since 2016.

After taking their flag down at the request of their HOA, they found out that floodlights were allowed so they bought six coloured ones.

The homeowner, who uses the Reddit username @memon17, said on the subreddit MaliciousCompliance: “We complied and removed the flag. Looking through our new rules, we noticed that removable lights are permitted without restriction so… we bought six coloured flood lights, and we washed our house in Pride colours.

“A little less subtle than our simple flag. A lot more fun for anyone complaining about the flag itself and what it represents.”

The post has received a torrent of responses, many from users with questions.

In response to one question, the homeowner wrote: “I don’t think they change the flag rule to attack me personally and that I decided to do this to show my individuality while still following the rules.”

Another Reddit user praised the homeowner’s actions.

“Well f***ing done! I live in a country that doesn’t have to deal with HOA BS. But! If someone came around to my house and tried to tell my son to take down his flag? I would leave my house looking like an explosion at the Skittles factory!”

The post has received a host of Reddit awards since being shared.

The homeowner did make it clear that he did not feel like he was being targeted directly, adding that the decision to light up his house in rainbow colours was to “show individuality while still following the rules”.

It is not uncommon in the US for HOAs to have strict flag policies.

Antoine Mikel came to blows with his HOA in Florida last year when they requested that he take down his BLM flag.

Mikel alleged that he was being discriminated against.

“A letter would have been sent had he flown a Blue Lives Matter flag off of his house. At this time, the Association does not intend to take any further action and considers the matter closed.”

What would you have done?

Image Via Alamy.