The temperature of a comet varies significantly depending on where it is in its orbit around the Sun. Its temperature can range from several degrees above absolute zero to 350 Kelvin or hotter.
According to Georgia State University, comets that are far away from a star can be as cold as a few tens of degrees Kelvin above absolute zero. However, when the comet is close to the Sun, its temperature can be hundreds of degrees higher. In the case of Halley's Comet, Chaisson and MacMillan suggest that its core temperature is 200 Kelvin and its surface temperature is 350 Kelvin when close to the Sun. Halley's Comet has been observed to be a combination of frozen water, volatile ices and rocky particles. According to the Encyclopedia Britannica, Halley's Comet's hot temperature when it is 0.9 AU away from the Sun is due to high heat absorption on its dark surface.