  The DQ white dwarfs are stars whose atmosphere is enriched with carbon, which
for cool stars ($T_{\rm eff}<8000\rm \, K$) is indicated by the Swan bands of
$\rm C_2$ in the optical part of their spectra. With decreasing effective
temperature these molecular bands undergo a significant blueshift ($\sim
100-300 \AA$). The origin of this phenomenon has been disputed over the last
two decades and has remained unknown. We attempt to address this problem by
investigating the impact of dense helium on the spectroscopic properties of
molecular carbon under the physical conditions encountered inside helium-rich,
fluid-like atmospheres of cool DQ white dwarfs. We found that the electronic
transition energy $T_e$ increases monotonically with the helium density
($\Delta T_{\rm e}\rm\, (eV)\sim1.6 \, \it \rho \rm \, (g/cm^3)$). This causes
the Swan absorption to occur at shorter wavelengths compared with unperturbed
$\rm C_2$. On the other hand the pressure-induced increase in the vibrational
frequency is insufficient to account for the observed Swan bands shifts. This
is consistent with the observations and indicates that the observed Swan-like
molecular bands are most likely the pressure-shifted bands of $\rm C_2$.
