I stored some coins in a sucrets, altoids, various tins over the years, from my experience, this yellow color is caused from contact with one of the metals these containers are made of, or what was originally stored in the tin.... really just a guess and observation, also like the M&Ms tin holiday banks packaging, same sort of thing. something to do with those metal containers.
i never had it happen with plastic or glass jars they always go brown scale over time, but they can turn yellow in those tin containers in a couple years to a decade.
As far as these tins, they used to be steel, more modern versions are thinly coated aluminum in order to stop the aluminum from leaching into the product, much like a soda can is coated on the inside. so maybe it's the coating, maybe it's the aluminum or steel contact over time, .aybe it's the product int he stin, like peppermints, or menthol,,,, but if you have a tin lying around stick some coins in there for a few years and forget about them and then inspect them down the road.