  We investigate the modification in the optical properties of laser-excited
bulk cobalt and nickel using the time-dependent density functional theory at a
finite electron temperature. As a result of the first-principles simulation, a
complex change in the photoabsorption of the magnetic materials is observed
around the $M_{2,3}$ absorption edge. Based on the microscopic analysis, we
clarify that this complex absorption change consists of the two following
components: (i) the decrease in the photoabsorption in a narrow energy range
around the $M_{2,3}$ edge, which reflects the blue shift of the absorption edge
due to the light-induced demagnetization, and (ii) the increase in the
photoabsorption in a wider range around the $M_{2,3}$ edge, which reflects the
modification in the local-field effect due to the light-induced electron
localization. The relation between the transient optical and magnetic
properties may open a way to monitor ultrafast (de)magnetization and spin
dynamics in magnetic materials via transient absorption spectroscopy.
