First, thanks for reporting some obvious unexpected chemistry occurring. Others in your community may also have similar metal leaching issues, which especially for children, may be a health concern (see, for example, this article).
My speculation, on what is occurring, is that the iron pipe in your shower is displacing (upon standing over time) some dissolved copper (possibly from created bicarbonate). The likely acidic rainwater may also contain chloride or nitrate salts, which may further complex with the fresh active copper precipitate. Here is a related illustrative source, per an article 'Electrochemical detection of nitrate and nitrite at a copper modified electrode' to quote:
The development of a reagentless electrode system for the determination of nitrate is presented. The approach is based upon the deposition of a macroporous copper deposit which shows marked selectivity for nitrate ion under mildly acidic conditions (pH 3) with a linear range extending from 10 to 200 mM nitrate.
So, do not employ Magnesium, address the iron presence. The coloration means there is some, but in actual amounts, most likely limited copper ion presence along with nitrate.