Optical versus thermal transitions in solids at high pressure.