One of our local police departments made a car stop on a carload of suspected gangbangers awhile back and found a loaded CZ75 9mm pistol under the drivers seat that had been painted orange in an obvious attempt to make it look like an airsoft gun.
The same day the same department received a 'man with a gun" call in a local residential neighborhood. The responding police found a group of late-teen boys involved in airsoft games with guns in which the orange markings had been painted black in an attempt to make the guns look real.
There is no way to tell if a gun pointed at you is real or airsoft or toy or pellet gun or anything else if it has been altered. In at least one state all airsoft guns sold have to be made of transparent plastic. Even then, anyone with a spray can can alter the appearance. BTW, metal- pellet guns ( .177 or .22) do not have orange markings because they are real guns.
Bottom line: there is sometimes no way to tell and if the officer hesitates he is trying for second place, and that's not where you want to finish.