As potential hydrogen storage media, magnesium based hydrides have been systematically studied in order to improve reversibility, storage capacity, kinetics and thermodynamics. The present article deals with the electrochemical and optical properties of Mg alloy hydrides. Electrochemical hydrogenation, compared to conventional gas phase hydrogen loading, provides precise control with only moderate reaction conditions. Interestingly, the alloy composition determines the crystallographic nature of the metal-hydride: a structural change is induced from rutile to fluorite at 80 at.% of Mg in Mg-TM alloy, with ensuing improved hydrogen mobility and storage capacity. So far, 6 wt.% (equivalent to 1600 mAh/g) of reversibly stored hydrogen in Mgy
(TM: Sc, Ti) has been reported. Thin film forms of these metal-hydrides reveal interesting electrochromic properties as a function of hydrogen content. Optical switching occurs during (de)hydrogenation between the reflective metal and the transparent metal hydride states. The chronological sequence of the optical improvements in optically active metal hydrides starts with the rare earth systems (YHx
), followed by Mg rare earth alloy hydrides (Mgy
) and concludes with Mg transition metal hydrides (Mgy
optical characterization of gradient thin films during (de)hydrogenation, denoted as hydrogenography, enables the monitoring of alloy composition gradients simultaneously.