How can the color of the sun be measured?

As the sun sets it changes color, sometimes first becoming orange, then red, for example.

The device typically used to measure color is a colorimeter, but all of the colorimeters I have seen only measure objects nearby or a physical sample like a swatch. How can we measure the color of distant objects, like the sun?

One idea I had is to use a telescope, then somehow attach a colorimeter to the eyepiece of the telescope, but am not sure if this is a feasible idea, hence the question.

• Does your colorimeter have an internal light source that it shines on the object, or does it just measure ambient light reflected off the object? – John Rennie Aug 31 '17 at 15:44

I did this once during my PhD studies, though that was 35 years ago and I forget the details. My recollection is that we shone the light onto pressed sheets of titanium dioxide (at least I think it was $\text{TiO}_2$) then used the colorimeter to measure the colour of the light reflected from the titanium dioxide.