Apart from a reflecting and a transparent state, rare-earth-Mg alloys ͑RE-Mg͒ exhibit also a highly absorbing, black state during loading with hydrogen. The occurrence of such a black state is due to the disproportionation into subwavelength size REH 2ϩ⑀ and Mg grains during the first hydrogen loading. While the optical properties of REH x change continuously with a further increase in hydrogen concentration x, Mg changes abruptly from a good reflector to a transparent insulator (MgH 2 ). Thin pure Mg films also show this black state when ͑un͒loaded carefully at elevated temperatures. By using the Bruggeman effective medium approximation in combination with the transfer matrix method it is shown that the coexistence of Mg and MgH 2 grains is the cause of this high absorption. Furthermore, we compare this phenomenon to the high absorption of light observed in metal-dielectric composites.