No one has a constitutional right to purchase toy guns that look exactly like real AK-47s and other automatic weapons. But one wouldn’t know that by the sound of some of the opposition to a sensible bill now moving through the state Legislature that would prohibit certain types of replica toy guns.

The bill, by Sens. Kevin de Leon, D-Los Angeles, and Noreen Evans, D-Santa Rosa, would require that look-a-like toy weapons be sold with fluorescent colors over the trigger guard and a fluorescent adhesive band around the gun. The guns also could be transparent.

The intent is to avoid the kind of deadly confrontation that claimed the life of 13-year-old Andy Lopez, who was shot by a sheriff’s deputy in an unincorporated area near Santa Rosa on Oct. 22, when the deputy mistook the BB gun he was carrying, a replica AK-47, for the real deal.

The bill passed out of the Assembly on Tuesday, but it was close. The vote was 41-34, the minimum needed to pass. The bill now moves back to the state Senate where its prospects are uncertain.

They shouldn’t be. This is a no-nonsense approach to fixing a real consumer danger, one that puts children at particular risk.

Toys are regularly pulled from store shelves for a variety of reasons, ranging from health risks from lead paint and choking hazards to problems with toys cause direct injury.

For example, the Consumer Protection Agency last week announced the voluntary recall of 2.2 million bean bag chairs following the deaths of two children, including a 13-year-old boy, who were able to unzip them, crawl inside and suffocate or choke on the foam beads.

Given that, why wouldn’t lawmakers be willing to pass a bill that would protect children from situations like the one that took the life of Andy Lopez?

In fact, de Leon had introduced the bill after two teenagers in Southern California were shot by law enforcement officers who believed their toy guns were authentic.

Critics point out that once these guns are sold, there’s no assurance that they will stay brightly colored or transparent. Sure enough. But it will certainly require more effort and discipline to alter their looks than simply breaking off an orange tip, which is apparently what happened with the BB gun that Andy Lopez was carrying.

Former Assembly Speaker John Pé rez, D-Los Angeles, an opponent, said it would lead to a situation “where people who we don’t think should have guns in the first place can go and paint the gun they have.”

That may be. But the state only has the ability to influence the actions of law-abiding citizens. And, at the moment, the state allows the purchase of toys that look almost exactly like real automatic weapons. That shouldn’t be.

Opponents, including the National Shooting Sports Foundation, say they’re opposed on the fear that it would diminish interest and skill development in shooting because many people train on BB guns before advancing to other types of weapons.

Maybe. But that’s a hollow argument for refusing to address what’s a health and safety threat to children. We don’t need any more examples of how real that threat is.

The state Senate should approve SB 199 before the end of the session, and the governor should sign it into law.