In 2018, Boulder, Colorado City Council enacted a gun and magazine ban. Yes, it has been subject to multiple lawsuits to no avail. However, a district judge declared the law null and void.
This particular case was brought by two Boulder residents who challenged the authority of the city council to enact or enforce the gun ban, given the fact that the state legislature in Colorado has reserved the right to set the gun laws in the state.
Specifically, the state preemptions statute bars localities from passing any law that “prohibits the sale, purchase, or possession of a firearm that a person may lawfully sell, purchase, or possess under state or federal law.” In Boulder’s case, the city tried to ban the possession of some of the most commonly owned arms in the country, and in his ruling Judge Andrew Hartman not only tossed out the law, but granted a permanent injunction blocking the city from any attempt to enforce the measure.