"I heard it was used by Israeli police to avoid friendly fire in situations where they may not be in uniform," s/he wrote.
It would make good sense for plainclothes officers moving among civilians to have highly visible markings on their guns, to avoid being mistaken for one of the bad guys. However, I can't imagine that this would work for long; surely an observant criminal, prior to an event, could pick up a roll of colored tape in order to blend in.
The striped tape used by the Capitol Police is at least not single-colored, but would be easy enough to fake with a red Sharpie and a steady hand. I imagine the tape colors would have to change daily and/or randomly in order to be effective.
Also, in the Capitol Police news photos from different angles, you'll notice each officer only has the tape on one side of their barrels, greatly limiting its visibility.
If "friendly" identification is indeed the purpose of these colored strips of tape, I'd say this is a design problem that's not been adequately solved. The stickers are diminutive and the visibility is not high, and they can be duplicated by others.
What would you suggest as a design fix? What easily discernible visual cue could an officer place on their gun daily, swapping it on a schedule, that would not compromise the gun's operation and holstering/unholstering?
Of course, in a perfect world police would carry effective but nonlethal weapons. In this world, however, that seems like a distant reality.