More like a deposit. Phosphatizing was developed for the army by the Parker company, who call the use of their formulations "Parkerizing", though many variants now exist. It is a metal conversion process, not a coating process. Coatings are applied by spraying or brushing or dipping and allowed to harden. Parkerizing is done by chemically reacting the steel with a heated chemical solution into which it has been submerged. Phosphoric acid in the solution etches and frees iron at the surface of the steel and activates it. The result is a conversion of a portion of the surface iron to iron phosphate which attaches intimately to the zinc or manganese phosphate (depending which kind of bath you are using) that grows its crystaline deposit on the surface.
The crystaline phosphate coating is porous and leaves a small amount of exposed free iron underneath, so, after rinsing, it is submerged in a water displacing oil, and often gets an additional rust inhibitive treatment. After rinsing and before treating with petroleum products, the coating can be dyed. The military process has an intermediate step in which the finished part is dipped in diluted hot chromic acid to passivate the free iron to discourage rust. In the case of the zinc phosphate coatings, this creates a certain amount of zinc chromate, which is greenish yellow, altering the coating color.
Manganese phosphatizing results in a darker and softer and thicker deposit and slides more easily against other sufraces. Zinc is lighter gray, is easier to dye and more porous, so it holds lubricant better. Left dry and un-oiled, zinc phosphatizing is recommended as a primer for getting the most durable results from spray-on coatings like Duracoat or Gun Kote or Brownells Teflon Moly finishes.
Patching a phosphate finish isn't in the cards unless you have a phosphating finishing setup and are using the original formulation. In that case you would just strip down, degrease and plop the injured piece in. Only the exposed fresh metal will react significantly. Because it is a chemical reaction that depends on surface etching, harder steel typically gets a darker, thinner coating in the process. You can look at something like a Parkerized Garand action and spot some color variation where the heat treatment has provided varying surface hardness.
The closest you can come to a home cure is going to be to buy a bottle of Brownells Oxpho Blue, cold blue, and dot it into the scuff with a toothpick until the scratch disappears. Kind of like photo retouching in pre-digital days. Oxpho Blue is actually a phosphating chemistry itself. It is really a dark gray more than blue. If you use it, just be prepared that it will darken and stain the parkerizing a little, so if you aren't careful, you may find you need to treat the whole gun with it before the scratch repair blends in perfectly.