That sort of depends. Originally, case hardening was used because the receivers were iron and the movement of the parts wore them down unless they were hardened. The colors were a by-product of case hardening, so coloring and hardening were the same thing.
With receivers made out of steel, which, unlike iron, can be hardened, the need for case hardening has gone away, but some people still like the coloring, so methods have been developed to apply the colors without hardening.
Factories that apply coloring by either method usually apply a coat of hard varnish or other coating to preserve the color.
Jim