Barrels are not case-hardened, but blued or rust-blackened. This is very different than the colors one sees on case-hardened receivers.

In real case hardening as one finds on receivers, a transparent film is created on the surface. This film has a varying refractive index and thickness and the colors one sees is the result of interference of light as it passes thru the film and is reflected out again. This is the same physical reason why "coated" camera lenses appear to be blue in reflected light; others orange. The coatings themselves are transparent but have different refractive indices.

In principle it is the same as the colors one sees in a rain-puddle that has a drop of oil spreading over the surface. These are known as Newton's rings.

Case coloring is the result of optical interference. It is NOT a pigment color - the layer is way too thin to be pigment-based color.

The transparent layers are very thin - measured in Angstroms. This is why they are so delicate.

If one used monochromatic light the perceived colors would tell you the thickness of the layer.